From Bugzilla Helper: User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt) Description of problem: I failed to compile 1) while I could compile 2) successfully. 1) ---test1.c---- #define _XOPEN_SOURCE #define _XOPEN_SOURCE_EXTENDED #include<ucontext.h> main() {} -------------- # gcc test1.c In file included from /usr/include/ucontext.h:28, from test.c:6: /usr/include/sys/ucontext.h:46: field `_mc' has incomplete type /usr/include/sys/ucontext.h:49: dereferencing pointer to incomplete type /usr/include/sys/ucontext.h:49: size of array `_pad' has non-integer type gcc: Internal compiler error: program cc1 got fatal signal 11 2) ---test2.c---- #define _BSD_SOURCE #include<ucontext.h> main() {} -------------- I think the cause is in /usr/include/signal.h. In signal.h, if __USE_XOPEN_EXTENDED was defined the valuable of mcontext_t type is used but the type is not defined without __USE_BSD. I suppose /usr/include/signal.h should be applied a patch like the following. --- signal.h Tue May 22 11:46:26 2001 +++ /usr/include/signal.h.modified Tue May 22 11:47:35 2001 @@ -311,6 +311,9 @@ #endif /* use BSD. */ +#if !defined __USE_BSD && defined __USE_XOPEN_EXTENDED +# include <bits/sigcontext.h> +#endif #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED How reproducible: Always Steps to Reproduce: 1.gcc -c test1.c 2.gcc -c test2.c 3. Additional info:
*** This bug has been marked as a duplicate of 35968 ***