qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 2/4] fix build error on ARM due to wrong glibc c


From: Stefan Weil
Subject: Re: [Qemu-devel] [PATCH 2/4] fix build error on ARM due to wrong glibc check
Date: Mon, 10 Dec 2012 18:46:01 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20121027 Iceowl/1.0b1 Icedove/3.0.11

Am 10.12.2012 07:59, schrieb 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<address@hidden>

---
  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;

Reviewed-by: Stefan Weil <address@hidden>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]