diff --git a/README b/README index 25ff36f9..74ce8154 100644 --- a/README +++ b/README @@ -37,8 +37,11 @@ least). On other systems that may trigger a SIGPIPE on send/recv, the main application should install a signal handler to handle SIGPIPE. libmicrohttpd should work well on GNU/Linux, BSD, OS X, W32 and z/OS. -Note that HTTPS is not supported on z/OS (yet). -We also have reports of users using it on vxWorks. +Note that HTTPS is not supported on z/OS (yet). We also have reports +of users using it on vxWorks. Note that on platforms where the +compiler does not support the "constructor" attribute, you must call +"MHD_init" before using any MHD functions and "MHD_fini" after you are +done using MHD. Notes on compiling on z/OS: diff --git a/src/daemon/daemon.c b/src/daemon/daemon.c index b824e9ea..c9959a74 100644 --- a/src/daemon/daemon.c +++ b/src/daemon/daemon.c @@ -1132,7 +1132,7 @@ sigalrmHandler (int sig) /** * Initialize the signal handler for SIGALRM. */ -void __attribute__ ((constructor)) MHD_pthread_handlers_ltdl_init () +void __attribute__ ((constructor)) MHD_init () { #ifndef WINDOWS /* make sure SIGALRM does not kill us */ @@ -1150,7 +1150,7 @@ void __attribute__ ((constructor)) MHD_pthread_handlers_ltdl_init () #endif } -void __attribute__ ((destructor)) MHD_pthread_handlers_ltdl_fini () +void __attribute__ ((destructor)) MHD_fini () { #if HTTPS_SUPPORT if (0 != pthread_mutex_destroy(&MHD_gnutls_init_mutex))