From: Simon McVittie Date: Thu, 25 Oct 2018 10:14:45 +0000 (+0100) Subject: cmake: Opt-in to modern APIs and thread-safety for Solaris X-Git-Tag: dbus-1.13.14~9^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a7bf808cca79a95631e3c82223a0bc8982c94d94;p=thirdparty%2Fdbus.git cmake: Opt-in to modern APIs and thread-safety for Solaris In the Autotools build system, the AC_USE_SYSTEM_EXTENSIONS macro defines __EXTENSIONS__ and _POSIX_PTHREAD_SEMANTICS, and we set the others explicitly when compiling for a Solaris host. Signed-off-by: Simon McVittie --- diff --git a/cmake/config.h.cmake b/cmake/config.h.cmake index 15f349097..608de875f 100644 --- a/cmake/config.h.cmake +++ b/cmake/config.h.cmake @@ -13,6 +13,16 @@ * should be placed in this file */ +/* Opt-in to modern APIs and thread-safety for Solaris. In the Autotools + * build system we do the equivalent of this by appending to CFLAGS + * in configure.ac */ +#ifdef __sun +# define __EXTENSIONS__ +# define _POSIX_PTHREAD_SEMANTICS +# define _REENTRANT +# define _XOPEN_SOURCE 500 +#endif + #cmakedefine DBUS_CONSOLE_AUTH_DIR "@DBUS_CONSOLE_AUTH_DIR@" #cmakedefine DBUS_DATADIR "@DBUS_DATADIR@" #cmakedefine DBUS_BINDIR "@DBUS_BINDIR@"