fix build error on ARM due to wrong glibc check
PATCH 2/4 fix build error on ARM due to wrong glibc check
From ae02bfc600bf8c4c8502e70bdf8dfcd332ebef02 Mon Sep 17 00:00:00 2001
From: John Spencer <[email protected]>
Date: Mon, 10 Dec 2012 06:54:03 +0100
Subject: [PATCH 2/4] fix build error on ARM due to wrong glibc check
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 <[email protected]>
--- user-exec.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
user-exec.c +1 -1
@@ -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;
Signature · 1 line
1.7.3.4