diff options
author | Armin K <krejzi@email.com> | 2017-12-23 21:12:04 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2017-12-30 21:56:18 +0100 |
commit | 7966020bdf0135b7d5c4c792883875019ae2a906 (patch) | |
tree | bf48148fae03ff7dbaed5c50b511a018833d874f /src/batch.c | |
parent | fb998eccee2030aabe249b1e7515050399e0304b (diff) |
src: Fix exporting symbols with clang
When EXPORT_SYMBOL is located after function definition, clang won't
properly export the function, resulting in a library with no symbols
when built with clang.
Based on libmnl commit dcdb47373a37 ("Move declaration of visibility
attributes before definition.")
Closes: https://bugzilla.netfilter.org/show_bug.cgi?id=1205
Signed-off-by: Armin K <krejzi@email.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/batch.c')
-rw-r--r-- | src/batch.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/batch.c b/src/batch.c index 5ee3fd7..ca8f922 100644 --- a/src/batch.c +++ b/src/batch.c @@ -57,6 +57,7 @@ static void nftnl_batch_add_page(struct nftnl_batch_page *page, list_add_tail(&page->head, &batch->page_list); } +EXPORT_SYMBOL(nftnl_batch_alloc); struct nftnl_batch *nftnl_batch_alloc(uint32_t pg_size, uint32_t pg_overrun_size) { struct nftnl_batch *batch; @@ -80,8 +81,8 @@ err1: free(batch); return NULL; } -EXPORT_SYMBOL(nftnl_batch_alloc); +EXPORT_SYMBOL(nftnl_batch_free); void nftnl_batch_free(struct nftnl_batch *batch) { struct nftnl_batch_page *page, *next; @@ -94,8 +95,8 @@ void nftnl_batch_free(struct nftnl_batch *batch) free(batch); } -EXPORT_SYMBOL(nftnl_batch_free); +EXPORT_SYMBOL(nftnl_batch_update); int nftnl_batch_update(struct nftnl_batch *batch) { struct nftnl_batch_page *page; @@ -119,20 +120,20 @@ int nftnl_batch_update(struct nftnl_batch *batch) err1: return -1; } -EXPORT_SYMBOL(nftnl_batch_update); +EXPORT_SYMBOL(nftnl_batch_buffer); void *nftnl_batch_buffer(struct nftnl_batch *batch) { return mnl_nlmsg_batch_current(batch->current_page->batch); } -EXPORT_SYMBOL(nftnl_batch_buffer); +EXPORT_SYMBOL(nftnl_batch_buffer_len); uint32_t nftnl_batch_buffer_len(struct nftnl_batch *batch) { return mnl_nlmsg_batch_size(batch->current_page->batch); } -EXPORT_SYMBOL(nftnl_batch_buffer_len); +EXPORT_SYMBOL(nftnl_batch_iovec_len); int nftnl_batch_iovec_len(struct nftnl_batch *batch) { int num_pages = batch->num_pages; @@ -143,8 +144,8 @@ int nftnl_batch_iovec_len(struct nftnl_batch *batch) return num_pages; } -EXPORT_SYMBOL(nftnl_batch_iovec_len); +EXPORT_SYMBOL(nftnl_batch_iovec); void nftnl_batch_iovec(struct nftnl_batch *batch, struct iovec *iov, uint32_t iovlen) { @@ -160,4 +161,3 @@ void nftnl_batch_iovec(struct nftnl_batch *batch, struct iovec *iov, i++; } } -EXPORT_SYMBOL(nftnl_batch_iovec); |