about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--conform/Makefile1
-rw-r--r--posix/unistd.h9
3 files changed, 15 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 55319d8848..93db66fd61 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2016-05-10  Joseph Myers  <joseph@codesourcery.com>
 
+	[BZ #20044]
+	* posix/unistd.h [__USE_UNIX98 && !__USE_XOPEN2K]
+	(pthread_atfork): New prototype.
+	* conform/Makefile (test-xfail-UNIX98/unistd.h/conform): Remove
+	variable.
+
 	[BZ #20043]
 	* posix/unistd.h [__USE_XOPEN && !__USE_XOPEN2K] (cuserid): New
 	prototype.
diff --git a/conform/Makefile b/conform/Makefile
index 32714e74ba..c4412ef36f 100644
--- a/conform/Makefile
+++ b/conform/Makefile
@@ -195,7 +195,6 @@ test-xfail-UNIX98/signal.h/conform = yes
 test-xfail-UNIX98/stdlib.h/conform = yes
 test-xfail-UNIX98/sys/wait.h/conform = yes
 test-xfail-UNIX98/ucontext.h/conform = yes
-test-xfail-UNIX98/unistd.h/conform = yes
 test-xfail-XOPEN2K/semaphore.h/conform = yes
 test-xfail-XOPEN2K/signal.h/conform = yes
 test-xfail-XOPEN2K/sys/wait.h/conform = yes
diff --git a/posix/unistd.h b/posix/unistd.h
index 4722f7fc5c..7486ecf4a9 100644
--- a/posix/unistd.h
+++ b/posix/unistd.h
@@ -1150,6 +1150,15 @@ extern char *cuserid (char *__s);
 #endif
 
 
+/* Unix98 requires this function to be declared here.  In other
+   standards it is in <pthread.h>.  */
+#if defined __USE_UNIX98 && !defined __USE_XOPEN2K
+extern int pthread_atfork (void (*__prepare) (void),
+			   void (*__parent) (void),
+			   void (*__child) (void)) __THROW;
+#endif
+
+
 /* Define some macros helping to catch buffer overflows.  */
 #if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function
 # include <bits/unistd.h>