Skip to contentSkip to conversation

Declare the define visibility attribute together

PATCH New Khem Raj 1 participant 1 message Apr 10, 2017 netfilter

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 Declare the define visibility attribute together

clang ignores the visibility attribute if its not defined before the definition. As a result these symbols become hidden and consumers of this library fail to link due to these missing symbols

---
 doxygen.cfg.in          |  2 +-
 src/internal.h          |  5 ++---
 src/libnetfilter_acct.c | 41 ++++++++++++++---------------------------
 3 files changed, 17 insertions(+), 31 deletions(-)
doxygen.cfg.in +1 -1
index 7f4bd04..fe64d48 100644
@@ -72,7 +72,7 @@ RECURSIVE              = YES
 EXCLUDE                = 
 EXCLUDE_SYMLINKS       = NO
 EXCLUDE_PATTERNS       = */.git/* .*.d
-EXCLUDE_SYMBOLS        = EXPORT_SYMBOL nfacct
+EXCLUDE_SYMBOLS        = nfacct
 EXAMPLE_PATH           = 
 EXAMPLE_PATTERNS       = 
 EXAMPLE_RECURSIVE      = NO
src/internal.h +2 -3
index f0cc2e1..e5c5ffd 100644
@@ -3,10 +3,9 @@
 
 #include "config.h"
 #ifdef HAVE_VISIBILITY_HIDDEN
-#	define __visible	__attribute__((visibility("default")))
-#	define EXPORT_SYMBOL(x)	typeof(x) (x) __visible
+#	define __EXPORT	__attribute__((visibility("default")))
 #else
-#	define EXPORT_SYMBOL
+#	define __EXPORT
 #endif
 
 #include <endian.h>
src/libnetfilter_acct.c +14 -27

184 lines not on this page · raw message

Signature · 1 line
2.12.2