Bug 1335284 - Enable pthread_atfork() on FreeBSD and OpenBSD.
authorConrad Meyer <cem@FreeBSD.org>
Sun, 26 Feb 2017 23:50:00 +0100
changeset 13231 e77d9a39893e4e19fb7bd6154048b407fe6fcbe2
parent 13230 0dca14409fefa9090db2a382d2dbfdc6d800852e
child 13232 0f3ae796883085adf072463b213500592b75cd7a
push id2101
push userfranziskuskiefer@gmail.com
push dateMon, 20 Mar 2017 13:10:56 +0000
bugs1335284
Bug 1335284 - Enable pthread_atfork() on FreeBSD and OpenBSD.
lib/softoken/softoken.h
--- a/lib/softoken/softoken.h
+++ b/lib/softoken/softoken.h
@@ -178,17 +178,17 @@ extern PRBool sftk_fatalError;
  */
 
 #ifdef SOLARIS
 
 /* Solaris 8, s9 use PID checks, s10 uses pthread_atfork */
 
 #define CHECK_FORK_MIXED
 
-#elif defined(LINUX) || defined(__GLIBC__)
+#elif defined(LINUX) || defined(__GLIBC__) || defined(FREEBSD) || defined(OPENBSD)
 
 #define CHECK_FORK_PTHREAD
 
 #else
 
 /* Other Unix platforms use only PID checks. Even if pthread_atfork is
  * available, the behavior of dlclose isn't guaranteed by POSIX to
  * unregister the fork handler. */