summaryrefslogtreecommitdiffstats
path: root/src/internal.h
diff options
context:
space:
mode:
authorKevin Cernekee <cernekee@chromium.org>2017-01-04 14:30:25 -0800
committerPablo Neira Ayuso <pablo@netfilter.org>2017-01-16 14:29:10 +0100
commitd0c4e39d12f903e06db262656cff2e24d267bed7 (patch)
tree1182a1994750383bbabd1119bc568b1fcf8f512f /src/internal.h
parentb17fc19b937f33635d73de75b43d62b56c16664f (diff)
Use __EXPORTED rather than EXPORT_SYMBOLHEADmaster
clang is sensitive to the ordering of __attribute__((visibility("default"))) relative to the function body. gcc is not. So if we try to re-declare an existing function with default visibility, clang prints a warning and generates a broken .so file in which nfct_timeout_* are not exported to library callers. Move the attribute up into the function definition to make clang happy. Signed-off-by: Kevin Cernekee <cernekee@chromium.org> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/internal.h')
-rw-r--r--src/internal.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/internal.h b/src/internal.h
index 3a88d1a..5d78171 100644
--- a/src/internal.h
+++ b/src/internal.h
@@ -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 __EXPORTED __attribute__((visibility("default")))
#else
-# define EXPORT_SYMBOL
+# define __EXPORTED
#endif
#endif