about summary refs log tree commit diff
path: root/posix
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2016-05-10 14:57:58 +0000
committerJoseph Myers <joseph@codesourcery.com>2016-05-10 14:57:58 +0000
commit46c1ffa4d50ec6a11fb845708a94f107fdb765d2 (patch)
tree3afac62233e7333817001dad959440af2c35af93 /posix
parentb9eca49e378d183ddf418f5deae1f389cd31dc28 (diff)
downloadglibc-46c1ffa4d50ec6a11fb845708a94f107fdb765d2.tar.gz
glibc-46c1ffa4d50ec6a11fb845708a94f107fdb765d2.tar.xz
glibc-46c1ffa4d50ec6a11fb845708a94f107fdb765d2.zip
Declare pthread_atfork in unistd.h for UNIX98 (bug 20044).
For UNIX98 (only), unistd.h should declare pthread_atfork, but that
declaration is missing.  This patch adds it.

Tested for x86_64 and x86 (testsuite, and that installed stripped
shared libraries are unchanged by the patch).

	[BZ #20044]
	* posix/unistd.h [__USE_UNIX98 && !__USE_XOPEN2K]
	(pthread_atfork): New prototype.
	* conform/Makefile (test-xfail-UNIX98/unistd.h/conform): Remove
	variable.
Diffstat (limited to 'posix')
-rw-r--r--posix/unistd.h9
1 files changed, 9 insertions, 0 deletions
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>