summaryrefslogtreecommitdiffstats
path: root/src/callback.c
diff options
context:
space:
mode:
authorPeter Foley <pefoley2@pefoley.com>2016-03-06 10:33:11 -0500
committerPablo Neira Ayuso <pablo@netfilter.org>2016-07-01 15:33:25 +0200
commitdcdb47373a375087d2dd8cee5e2a9c66fcc147eb (patch)
tree20436c514da06d7e5d29a5aa63b6580119a4957c /src/callback.c
parent610b1208a4d87b874e55982d44c0a9a1a1b7b00d (diff)
Move declaration of visibility attributes before definition.
When compiling with clang, the visibility attributes are ignored since they are after the definition of the exported function. Fix this by moving the attribute declaration before the function. attr.c:439:1: error: attribute declaration must precede definition [-Werror,-Wignored-attributes] EXPORT_SYMBOL(mnl_attr_put_u8); ^ ./internal.h:7:41: note: expanded from macro 'EXPORT_SYMBOL' ^ ./internal.h:6:35: note: expanded from macro '__visible' ^ attr.c:435:6: note: previous definition is here void mnl_attr_put_u8(struct nlmsghdr *nlh, uint16_t type, uint8_t data) ^ Signed-off-by: Peter Foley <pefoley2@pefoley.com>
Diffstat (limited to 'src/callback.c')
-rw-r--r--src/callback.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/callback.c b/src/callback.c
index f023401..beaeb59 100644
--- a/src/callback.c
+++ b/src/callback.c
@@ -126,6 +126,7 @@ out:
* to EPROTO. If the dump was interrupted, errno is set to EINTR and you should
* request a new fresh dump again.
*/
+EXPORT_SYMBOL(mnl_cb_run2);
int
mnl_cb_run2(const void *buf, size_t numbytes, unsigned int seq,
unsigned int portid, mnl_cb_t cb_data, void *data,
@@ -134,7 +135,6 @@ mnl_cb_run2(const void *buf, size_t numbytes, unsigned int seq,
return __mnl_cb_run(buf, numbytes, seq, portid, cb_data, data,
cb_ctl_array, cb_ctl_array_len);
}
-EXPORT_SYMBOL(mnl_cb_run2);
/**
* mnl_cb_run - callback runqueue for netlink messages (simplified version)
@@ -155,13 +155,13 @@ EXPORT_SYMBOL(mnl_cb_run2);
*
* This function propagates the callback return value.
*/
+EXPORT_SYMBOL(mnl_cb_run);
int
mnl_cb_run(const void *buf, size_t numbytes, unsigned int seq,
unsigned int portid, mnl_cb_t cb_data, void *data)
{
return __mnl_cb_run(buf, numbytes, seq, portid, cb_data, data, NULL, 0);
}
-EXPORT_SYMBOL(mnl_cb_run);
/**
* @}