GNOME Bugzilla – Bug 663991
_XOPEN_SOURCE 500 causes error in Solaris Studio compiler
Last modified: 2012-05-26 03:13:16 UTC
When compiling gtk+-3.0.12 with Solaris Studio 12.2 on Solaris 10 x86, I get the following error: "/usr/include/sys/feature_tests.h", line 332: #error: "Compiler or options invalid for pre-UNIX 03 X/Open applications and pre-2001 POSIX applications" cc: acomp failed for gtksearchenginesimple.c It works after I apply: --- ./gtk/gtksearchenginesimple.c.orig Sun Nov 13 20:58:42 2011 +++ ./gtk/gtksearchenginesimple.c Sun Nov 13 20:58:54 2011 @@ -27,7 +27,7 @@ * export ftw() and friends only if _XOPEN_SOURCE and _GNU_SOURCE * are defined. see bug #444097. */ -#define _XOPEN_SOURCE 500 +#define _XOPEN_SOURCE 600 #define _GNU_SOURCE #ifdef HAVE_FTW_H However, I'm not sure about the implications of making this change on other platforms. I run the build with -std=c99, which is what the default was.
Not limited to Solaris Studio compiler, also with gcc the same happpens. C99 implies at minimum _XOPEN_SOURCE=600.