[PATCH] D15086: builtins: Fix the sysroot's reference to si_int in int_types.h

Sumanth Gundapaneni via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 30 11:29:37 PST 2015


sgundapa created this revision.
sgundapa added reviewers: joerg, rengolin.
sgundapa added a subscriber: llvm-commits.

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


http://reviews.llvm.org/D15086

Files:
  lib/builtins/int_types.h

Index: lib/builtins/int_types.h
===================================================================
--- lib/builtins/int_types.h
+++ lib/builtins/int_types.h
@@ -20,6 +20,10 @@
 
 #include "int_endianness.h"
 
+/* si_int is defined in sysroot's asm-generic/siginfo.h */
+#ifdef si_int
+#undef si_int
+#endif
 typedef      int si_int;
 typedef unsigned su_int;
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15086.41416.patch
Type: text/x-patch
Size: 362 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151130/190945f4/attachment.bin>


More information about the llvm-commits mailing list