diff options
author | Robin Hack <hack.robin@gmail.com> | 2015-01-23 15:10:02 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2015-01-28 17:17:07 +0100 |
commit | a79b5cf41c49a36a88d4ba486171699668a5357a (patch) | |
tree | ee4cc5765ae47bce5541d5f872330dae0291a314 /lib/uid_wrapper/wscript | |
parent | e279eee670310530eebe5dcfa3fc16b54d0356f2 (diff) | |
download | samba-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/wscript | 17 |
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)); |