Opt-in to thread safety on Solaris
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Wed, 26 Jan 2011 18:21:49 +0000 (18:21 +0000)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Thu, 27 Jan 2011 17:53:45 +0000 (17:53 +0000)
Alternatively, get a better C library. :-)

See also:
<http://lists.freedesktop.org/archives/dbus/2010-November/013796.html>,
<http://lists.freedesktop.org/archives/dbus/2010-December/013902.html>.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33464
Reviewed-by: Colin Walters <walters@verbum.org>
configure.in

index 9aeb159..08bd962 100644 (file)
@@ -1307,11 +1307,10 @@ AC_SUBST(SECTION_FLAGS)
 AC_SUBST(SECTION_LDFLAGS)
 AC_MSG_RESULT($ac_gcsections)
 
-# Add -D_POSIX_PTHREAD_SEMANTICS if on Solaris
-#
 case $host_os in
     solaris*)
-       CFLAGS="$CFLAGS -D_POSIX_PTHREAD_SEMANTICS" ;;
+        # Solaris' C library apparently needs these runes to be threadsafe...
+        CFLAGS="$CFLAGS -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT"
 esac
 
 changequote(,)dnl