diff options
author | John Spencer <maillist-qemu@barfooze.de> | 2012-12-10 07:59:44 +0100 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2012-12-18 17:21:13 +0100 |
commit | e12cdb1b4055530c61fe99683d256c42e9e62ac8 (patch) | |
tree | 9085ebe285fe05e3e3d471855dd8b0819fbf46f3 | |
parent | 887eb29930a7b48e46d16916cb050d114016f143 (diff) | |
download | hqemu-e12cdb1b4055530c61fe99683d256c42e9e62ac8.zip hqemu-e12cdb1b4055530c61fe99683d256c42e9e62ac8.tar.gz |
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 <maillist-qemu@barfooze.de>
Reviewed-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
-rw-r--r-- | user-exec.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |