WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [Patch] Trivial fix for compile failure with latest glibc

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [Patch] Trivial fix for compile failure with latest glibc
From: "Stephen C. Tweedie" <sct@xxxxxxxxxx>
Date: Wed, 20 Sep 2006 23:05:25 +0100
Delivery-date: Wed, 20 Sep 2006 15:06:02 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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.

Signed-off-by: Stephen Tweedie <sct@xxxxxxxxxx>

--- xen-unstable-11539/tools/libxc/xc_ptrace.c.~1~      2006-09-20 
13:56:32.000000000 +0100
+++ xen-unstable-11539/tools/libxc/xc_ptrace.c  2006-09-20 22:26:56.000000000 
+0100
@@ -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
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [Patch] Trivial fix for compile failure with latest glibc, Stephen C. Tweedie <=