[compiler-rt] r254472 - builtins: Fix the sysroot's reference to si_int in int_types.h

Sumanth Gundapaneni via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 1 15:06:23 PST 2015


Author: sgundapa
Date: Tue Dec  1 17:06:23 2015
New Revision: 254472

URL: http://llvm.org/viewvc/llvm-project?rev=254472&view=rev
Log:
builtins: Fix the sysroot's reference to si_int in int_types.h

si_int is already defined in sysroot's siginfo.h
emutls.c includes pthread.h which includes asm/siginfo.h which
in turn includes asm-generic/siginfo.h and that defines si_int.
si_int is also defined in builtin's int_types.h and this leads to
errors. This patch fixes the issue by undefining the si_int in int_types.h

Differential Revision: http://reviews.llvm.org/D15086

Modified:
    compiler-rt/trunk/lib/builtins/int_types.h

Modified: compiler-rt/trunk/lib/builtins/int_types.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/int_types.h?rev=254472&r1=254471&r2=254472&view=diff
==============================================================================
--- compiler-rt/trunk/lib/builtins/int_types.h (original)
+++ compiler-rt/trunk/lib/builtins/int_types.h Tue Dec  1 17:06:23 2015
@@ -20,6 +20,10 @@
 
 #include "int_endianness.h"
 
+/* si_int is defined in Linux sysroot's asm-generic/siginfo.h */
+#ifdef si_int
+#undef si_int
+#endif
 typedef      int si_int;
 typedef unsigned su_int;
 




More information about the llvm-commits mailing list