diff mbox

[1/13] libitm fixes for musl support

Message ID 55354A98.5020307@arm.com
State New
Headers show

Commit Message

Szabolcs Nagy April 20, 2015, 6:51 p.m. UTC
This are minor correctness fixes required for musl.

(fcntl.h is the standard header and always available on Linux,
sys/fcntl.h is just a legacy alias, so use the standard one.)

libitm/Changelog:

2015-04-16  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.

Comments

Jeff Law April 20, 2015, 8:41 p.m. UTC | #1
On 04/20/2015 12:51 PM, Szabolcs Nagy wrote:
> This are minor correctness fixes required for musl.
>
> (fcntl.h is the standard header and always available on Linux,
> sys/fcntl.h is just a legacy alias, so use the standard one.)
>
> libitm/Changelog:
>
> 2015-04-16  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.
>
OK.
jeff
Kyrylo Tkachov April 22, 2015, 2:34 p.m. UTC | #2
On 20/04/15 21:41, Jeff Law wrote:
> On 04/20/2015 12:51 PM, Szabolcs Nagy wrote:
>> This are minor correctness fixes required for musl.
>>
>> (fcntl.h is the standard header and always available on Linux,
>> sys/fcntl.h is just a legacy alias, so use the standard one.)
>>
>> libitm/Changelog:
>>
>> 2015-04-16  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.
>>
> OK.
> jeff

I've committed this on Szabolcs' behalf with r222325.

Kyrill
diff mbox

Patch

diff --git a/libitm/config/arm/hwcap.cc b/libitm/config/arm/hwcap.cc
index a1c2cfd..ea8f023 100644
--- a/libitm/config/arm/hwcap.cc
+++ b/libitm/config/arm/hwcap.cc
@@ -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))
diff --git a/libitm/config/linux/x86/tls.h b/libitm/config/linux/x86/tls.h
index e731ab7..54ad8b6 100644
--- a/libitm/config/linux/x86/tls.h
+++ b/libitm/config/linux/x86/tls.h
@@ -25,16 +25,19 @@ 
 #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