aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2016-10-20 10:35:50 +0200
committerMichael Adam <obnox@samba.org>2016-10-20 11:21:59 +0200
commitc989bbc9f6afaad9e4b26501d57d7acb1297d1cb (patch)
treee49594f2e76f19831d4b96826942963989d5383b /src
parentf5cddcd300b779131662519d56ae90fcebe459e1 (diff)
downloadsocket_wrapper-c989bbc9f6afaad9e4b26501d57d7acb1297d1cb.tar.gz
socket_wrapper-c989bbc9f6afaad9e4b26501d57d7acb1297d1cb.tar.xz
socket_wrapper-c989bbc9f6afaad9e4b26501d57d7acb1297d1cb.zip
cmake: Check for constructor attribute
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'src')
-rw-r--r--src/socket_wrapper.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/socket_wrapper.c b/src/socket_wrapper.c
index e205a36..18c1626 100644
--- a/src/socket_wrapper.c
+++ b/src/socket_wrapper.c
@@ -95,6 +95,12 @@ enum swrap_dbglvl_e {
#define PRINTF_ATTRIBUTE(a,b)
#endif /* HAVE_FUNCTION_ATTRIBUTE_FORMAT */
+#ifdef HAVE_CONSTRUCTOR_ATTRIBUTE
+#define CONSTRUCTOR_ATTRIBUTE __attribute__ ((constructor))
+#else
+#define CONSTRUCTOR_ATTRIBUTE
+#endif /* HAVE_CONSTRUCTOR_ATTRIBUTE */
+
#ifdef HAVE_DESTRUCTOR_ATTRIBUTE
#define DESTRUCTOR_ATTRIBUTE __attribute__ ((destructor))
#else