summaryrefslogtreecommitdiffstats
path: root/lib/uid_wrapper/wscript
diff options
context:
space:
mode:
authorRobin Hack <hack.robin@gmail.com>2015-01-23 15:10:02 +0100
committerAndreas Schneider <asn@cryptomilk.org>2015-01-28 17:17:07 +0100
commita79b5cf41c49a36a88d4ba486171699668a5357a (patch)
treeee4cc5765ae47bce5541d5f872330dae0291a314 /lib/uid_wrapper/wscript
parente279eee670310530eebe5dcfa3fc16b54d0356f2 (diff)
downloadsamba-a79b5cf41c49a36a88d4ba486171699668a5357a.tar.gz
samba-a79b5cf41c49a36a88d4ba486171699668a5357a.tar.xz
samba-a79b5cf41c49a36a88d4ba486171699668a5357a.zip
uwrap: Add library constructor and move pthread_atfork inside.
Library constructor is used for pthread_atfork call. Moved here because pthread_atfork is cumulative and should be called only once. Signed-off-by: Robin Hack <hack.robin@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'lib/uid_wrapper/wscript')
-rw-r--r--lib/uid_wrapper/wscript17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/uid_wrapper/wscript b/lib/uid_wrapper/wscript
index 6b585956e0..bd797e5a72 100644
--- a/lib/uid_wrapper/wscript
+++ b/lib/uid_wrapper/wscript
@@ -21,6 +21,23 @@ def configure(conf):
addmain=False,
msg='Checking for thread local storage')
+ # check HAVE_CONSTRUCTOR_ATTRIBUTE
+ conf.CHECK_CODE('''
+ void test_constructor_attribute(void) __attribute__ ((constructor));
+
+ void test_constructor_attribute(void)
+ {
+ return;
+ }
+
+ int main(void) {
+ return 0;
+ }
+ ''',
+ 'HAVE_CONSTRUCTOR_ATTRIBUTE',
+ addmain=False,
+ msg='Checking for library constructor support')
+
# check HAVE_DESTRUCTOR_ATTRIBUTE
conf.CHECK_CODE('''
void test_destructor_attribute(void) __attribute__ ((destructor));