libitm fixes for musl support
authorGregor Richards <gregor.richards@uwaterloo.ca>
Wed, 22 Apr 2015 14:11:25 +0000 (14:11 +0000)
committerKyrylo Tkachov <ktkachov@gcc.gnu.org>
Wed, 22 Apr 2015 14:11:25 +0000 (14:11 +0000)
On behalf of Szabolcs.Nagy@arm.com

2015-04-22  Gregor Richards  <gregor.richards@uwaterloo.ca>

       * config/arm/hwcap.cc: Use fcntl.h instead of sys/fcntl.h.
       * config/linux/x86/tls.h: Only use __GLIBC_PREREQ if defined.

From-SVN: r222325

libitm/ChangeLog
libitm/config/arm/hwcap.cc
libitm/config/linux/x86/tls.h

index e46819cf3afed45745f8e8fb745214e549a6d1ba..78b2de05f6d0f856ba978b6cb722aefe1689d29f 100644 (file)
@@ -1,3 +1,8 @@
+2015-04-22  Gregor Richards  <gregor.richards@uwaterloo.ca>
+
+       * config/arm/hwcap.cc: Use fcntl.h instead of sys/fcntl.h.
+       * config/linux/x86/tls.h: Only use __GLIBC_PREREQ if defined.
+
 2015-01-15  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR libitm/64360
index a1c2cfd41f7cb48b0b2a58818f129ed36081ae2f..ea8f023c93b834fd42e40c8cc5c5279f4f65f5e0 100644 (file)
@@ -40,7 +40,7 @@ int GTM_hwcap HIDDEN = 0
 
 #ifdef __linux__
 #include <unistd.h>
-#include <sys/fcntl.h>
+#include <fcntl.h>
 #include <elf.h>
 
 static void __attribute__((constructor))
index e731ab7e01506fae08a0ea9d8cb7b4ff315e8e87..54ad8b67bb541a81c70fad01c3e9513afaf97e1b 100644 (file)
 #ifndef LIBITM_X86_TLS_H
 #define LIBITM_X86_TLS_H 1
 
-#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10)
+#if defined(__GLIBC_PREREQ)
+#if __GLIBC_PREREQ(2, 10)
 /* Use slots in the TCB head rather than __thread lookups.
    GLIBC has reserved words 10 through 13 for TM.  */
 #define HAVE_ARCH_GTM_THREAD 1
 #define HAVE_ARCH_GTM_THREAD_DISP 1
 #endif
+#endif
 
 #include "config/generic/tls.h"
 
-#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10)
+#if defined(__GLIBC_PREREQ)
+#if __GLIBC_PREREQ(2, 10)
 namespace GTM HIDDEN {
 
 #ifdef __x86_64__
@@ -101,5 +104,6 @@ static inline void set_abi_disp(struct abi_dispatch *x)
 
 } // namespace GTM
 #endif /* >= GLIBC 2.10 */
+#endif
 
 #endif // LIBITM_X86_TLS_H