From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:44903) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ThxMC-0000JO-DO for qemu-devel@nongnu.org; Mon, 10 Dec 2012 02:00:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ThxM9-0005Rr-VT for qemu-devel@nongnu.org; Mon, 10 Dec 2012 02:00:52 -0500 From: John Spencer Date: Mon, 10 Dec 2012 07:59:44 +0100 Message-Id: <1355122786-29243-2-git-send-email-maillist-qemu@barfooze.de> In-Reply-To: <1355122786-29243-1-git-send-email-maillist-qemu@barfooze.de> References: <1355122786-29243-1-git-send-email-maillist-qemu@barfooze.de> Subject: [Qemu-devel] [PATCH 2/4] fix build error on ARM due to wrong glibc check List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-trivial@nongnu.org Cc: qemu-devel@nongnu.org, 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 --- user-exec.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/user-exec.c b/user-exec.c index ef9b172..cccc145 100644 --- a/user-exec.c +++ b/user-exec.c @@ -442,7 +442,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.7.3.4