components/libmicrohttpd/patches/010.patch
author Drew Fisher <drew.fisher@oracle.com>
Thu, 23 Mar 2017 08:04:21 -0700
changeset 7801 0dc67d04f8bb
parent 7790 178c7062efc0
permissions -rw-r--r--
25772305 problem in SERVICE/NOVA

Tomas Heran <[email protected]>
Solaris Studio understands __attribute__ ((constructor|destructor)) as well as
GNU C.
Upstream bug: https://gnunet.org/bugs/view.php?id=4887

diff -r d61abfd2e00c -r 035e9e268ad6 src/include/autoinit_funcs.h
--- a/src/include/autoinit_funcs.h	Wed Feb 08 12:57:20 2017 +0100
+++ b/src/include/autoinit_funcs.h	Fri Feb 10 14:17:39 2017 +0100
@@ -67,7 +67,7 @@
 */
 #define AUTOINIT_FUNCS_VERSION 0x01000001
 
-#if defined(__GNUC__)
+#if defined(__GNUC__) || defined(__SUNPRO_C)
 #/* if possible - check for supported attribute */
 #ifdef __has_attribute
 #if !__has_attribute(constructor) || !__has_attribute(destructor)
@@ -76,7 +76,7 @@
 #endif /* __has_attribute */
 #endif /* __GNUC__ */
 
-#if defined(__GNUC__) && !defined(_GNUC_ATTR_CONSTR_NOT_SUPPORTED)
+#if (defined(__GNUC__) || defined(__SUNPRO_C)) && !defined(_GNUC_ATTR_CONSTR_NOT_SUPPORTED)
 
 #define GNUC_SET_INIT_AND_DEINIT(FI,FD) \
   void __attribute__ ((constructor)) _GNUC_init_helper_##FI(void) \