From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:48761) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tl0OJ-0002T0-GE for qemu-devel@nongnu.org; Tue, 18 Dec 2012 11:51:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tl0OF-0005RU-Av for qemu-devel@nongnu.org; Tue, 18 Dec 2012 11:51:39 -0500 Received: from mx1.redhat.com ([209.132.183.28]:1787) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tl0OF-0005RH-1g for qemu-devel@nongnu.org; Tue, 18 Dec 2012 11:51:35 -0500 From: Stefan Hajnoczi Date: Tue, 18 Dec 2012 17:51:14 +0100 Message-Id: <1355849477-1226-8-git-send-email-stefanha@redhat.com> In-Reply-To: <1355849477-1226-1-git-send-email-stefanha@redhat.com> References: <1355849477-1226-1-git-send-email-stefanha@redhat.com> Subject: [Qemu-devel] [PATCH 07/10] fix build error on ARM due to wrong glibc check List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Anthony Liguori From: John Spencer the test for glibc < 2 "succeeds" wrongly for any non-glibc C library, and breaks the build on musl libc. we must first test if __GLIBC__ is defined at all, before using it unconditionally. Signed-off-by: John Spencer Reviewed-by: Stefan Weil Signed-off-by: Stefan Hajnoczi --- user-exec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user-exec.c b/user-exec.c index 1185cb0..5863b9f 100644 --- a/user-exec.c +++ b/user-exec.c @@ -436,7 +436,7 @@ int cpu_signal_handler(int host_signum, void *pinfo, unsigned long pc; int is_write; -#if (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 3)) +#if defined(__GLIBC__) && (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 3)) pc = uc->uc_mcontext.gregs[R15]; #else pc = uc->uc_mcontext.arm_pc; -- 1.8.0.2