GNOME Bugzilla – Bug 582739
metacity-mag.c doesn't compile on solaris
Last modified: 2017-03-18 18:12:15 UTC
Thanks to the #define _XOPEN_SOURCE 600 /* C99 -- for rint() */ in metacity-mag.c, compiling on solaris gives: /usr/include/sys/feature_tests.h:357:2: #error "Compiler or options invalid; UNIX 03 and POSIX.1-2001 applications require the use of c99" http://wiki.netbsd.se/Typical_pkgsrc_error_messages#Compiler_or_options_invalid_for_pre-UNIX_03_X.2FOpen_applications__and_pre-2001_POSIX_applications has some ideas.
OK, looking into it further you need to remove -ansi from CFLAGS, and add -std=c99 to CFLAGS. Or just remove #define completely which seems to work OK on Solaris and Linux, and is what Sun does: http://src.opensolaris.org/source/xref/jds/spec-files/trunk/patches/metacity-06-remove-xopen-source-posix.diff