Skip to contentSkip to conversation

Trivial fix for compile failure with latest glibc

PATCH New Stephen C. Tweedie 1 participant 1 message Sep 20, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Trivial fix for compile failure with latest glibc

Hi,

libxc fails to compile for me on the very latest glibc due to a combination of -Werror, a switch() statement in xc_ptrace() without a default, and 4 new enum values in the latest glibc. Easy fix attached.

--Stephen

Fix libxc compile failure against new glibc

libxc's ptrace code #includes <sys/ptrace.h> for enum __ptrace_request, and in xc_ptrace() has a long switch statement to handle the various cases. Unfortunately the latest glibc adds various new values to the enum which are not caught in the switch statement, and so compilation with -Werror fails.

Fix this the trivial way with a default: so that both older and newer glibcs still work.

tools/libxc/xc_ptrace.c renamed from tools/libxc/xc_ptrace.c.~1~ +1 -0
@@ -617,6 +617,7 @@
     case PTRACE_POKEUSER:
     case PTRACE_SYSCALL:
     case PTRACE_KILL:
+    default:
         goto out_unsupported; /* XXX not yet supported */
 
     case PTRACE_TRACEME:

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel