netmap: Update to tip and fix misc build issues
PATCH 1/32 netmap: Update to tip and fix misc build issues
From: Armin Kuster <[email protected]>
Update to pick up 4.10 and below kernel patches. Change LICENSE to reflect changes noted by the maintainer adapt to makefile changes for module install dest location fix compile issues do to gcc 6.x
remove unneeded patches
--- .../recipes-kernel/netmap/files/gcc_6_fix.patch | 170 +++++++++++++++++++++ .../recipes-kernel/netmap/netmap-modules_git.bb | 9 +- meta-networking/recipes-kernel/netmap/netmap.inc | 8 +- .../recipes-kernel/netmap/netmap_git.bb | 8 +- 4 files changed, 182 insertions(+), 13 deletions(-) create mode 100644 meta-networking/recipes-kernel/netmap/files/gcc_6_fix.patch
meta-networking/recipes-kernel/netmap/files/gcc_6_fix.patch new file +170 -0
@@ -0,0 +1,170 @@ +Fix build issues do to gcc 6.x + +Upstream-Status: Pending + +loads of error: format '%lu' expects argument of type 'long unsigned int', but argument 7 has type 'long long unsigned int' + +and error: left shift count >= width of type [-Werror=shift-count-overflow] + +Signed-off-by: Armin Kuster <[email protected]> + +Index: git/apps/lb/lb.c +=================================================================== +--- git.orig/apps/lb/lb.c ++++ git/apps/lb/lb.c +@@ -935,7 +935,7 @@ run: + if (hash == 0) { + non_ip++; // XXX ?? + } +- rs->ptr = hash | (1UL << 32); ++ rs->ptr = hash | (1ULL << 32); + // prefetch the buffer for the next round + next_cur = nm_ring_next(rxring, next_cur); + next_slot = &rxring->slot[next_cur]; +Index: git/apps/tlem/tlem.c +=================================================================== +--- git.orig/apps/tlem/tlem.c ++++ git/apps/tlem/tlem.c +@@ -513,7 +513,7 @@ no_room(struct _qs *q) + q_reclaim(q); + if (q->prod_queued > q->qsize) { + q->prod_drop++; +- RD(1, "too many bytes queued %lu, drop %lu", ++ RD(1, "too many bytes queued %llu, drop %llu", + (_P64)q->prod_queued, (_P64)q->prod_drop); + return 1; + } +@@ -523,7 +523,7 @@ no_room(struct _qs *q) + h = q->prod_head = q->head; /* re-read head, just in case */ + /* repeat the test */ + if ((h <= t && new_t == 0 && h == 0) || (h > t && (new_t == 0 || new_t >= h)) ) { +- ND(1, "no room for insert h %ld t %ld new_t %ld", ++ ND(1, "no room for insert h %lld t %lld new_t %lld", + (_P64)h, (_P64)t, (_P64)new_t); + return 1; /* no room for insert */ + } +@@ -906,14 +906,14 @@ tlem_main(void *_a) + + q->buf = calloc(1, need); + if (q->buf == NULL) { +- ED("alloc %ld bytes for queue failed, exiting", (_P64)need); ++ ED("alloc %lld bytes for queue failed, exiting", (_P64)need); + nm_close(a->pa); + nm_close(a->pb); + return(NULL); + } + q->buflen = need; +- ED("----\n\t%s -> %s : bps %ld delay %s loss %s queue %ld bytes" +- "\n\tbuffer %lu bytes", ++ ED("----\n\t%s -> %s : bps %lld delay %s loss %s queue %lld bytes" ++ "\n\tbuffer %llu bytes", + q->prod_ifname, q->cons_ifname, + (_P64)q->max_bps, q->c_delay.optarg, q->c_loss.optarg, (_P64)q->qsize, + (_P64)q->buflen); +@@ -1258,7 +1258,7 @@ main(int argc, char **argv) + struct _qs *q0 = &bp[0].q, *q1 = &bp[1].q; + + sleep(1); +- ED("%ld -> %ld maxq %d round %ld, %ld <- %ld maxq %d round %ld", ++ ED("%lld -> %lld maxq %d round %lld, %lld <- %lld maxq %d round %lld", + (_P64)(q0->rx - olda.rx), (_P64)(q0->tx - olda.tx), + q0->rx_qmax, (_P64)q0->prod_max_gap, + (_P64)(q1->rx - oldb.rx), (_P64)(q1->tx - oldb.tx), +@@ -1553,7 +1553,7 @@ uniform_delay_parse(struct _qs *q, struc + dmax = parse_time(av[2]); + if (dmin == U_PARSE_ERR || dmax == U_PARSE_ERR || dmin > dmax) + return 1; +- D("dmin %ld dmax %ld", (_P64)dmin, (_P64)dmax); ++ D("dmin %lld dmax %lld", (_P64)dmin, (_P64)dmax); + dst->d[0] = dmin; + dst->d[1] = dmax; + dst->d[2] = dmax - dmin; +@@ -1618,7 +1618,7 @@ exp_delay_run(struct _qs *q, struct _cfg + { + uint64_t *t = (uint64_t *)arg->arg; + q->cur_delay = t[my_random24() & (PTS_D_EXP - 1)]; +- RD(5, "delay %lu", (_P64)q->cur_delay); ++ RD(5, "delay %llu", (_P64)q->cur_delay); + return 0; + } + +@@ -1777,7 +1777,7 @@ const_ber_parse(struct _qs *q, struct _c + plr[i] = mask; + #if 0 + if (i>= 60) // && plr[i] < mask/2) +- RD(50,"%4d: %le %ld", i, 1.0 - cur, (_P64)plr[i]); ++ RD(50,"%4d: %le %lld", i, 1.0 - cur, (_P64)plr[i]); + #endif + } + dst->d[0] = ber * (mask + 1); +Index: git/apps/nmreplay/nmreplay.c +=================================================================== +--- git.orig/apps/nmreplay/nmreplay.c ++++ git/apps/nmreplay/nmreplay.c +@@ -771,7 +771,7 @@ pcap_prod(void *_pa) + need = loops * pf->tot_bytes_rounded + sizeof(struct q_pkt); + q->buf = calloc(1, need); + if (q->buf == NULL) { +- D("alloc %ld bytes for queue failed, exiting",(_P64)need); ++ D("alloc %lld bytes for queue failed, exiting",(_P64)need); + goto fail; + } + q->prod_head = q->prod_tail = 0; +@@ -1261,7 +1261,7 @@ main(int argc, char **argv) + struct _qs *q0 = &bp[0].q; + + sleep(1); +- ED("%ld -> %ld maxq %d round %ld", ++ ED("%lld -> %lld maxq %d round %lld", + (_P64)(q0->rx - olda.rx), (_P64)(q0->tx - olda.tx), + q0->rx_qmax, (_P64)q0->prod_max_gap + ); +@@ -1529,7 +1529,7 @@ uniform_delay_parse(struct _qs *q, struc + dmax = parse_time(av[2]); + if (dmin == U_PARSE_ERR || dmax == U_PARSE_ERR || dmin > dmax) + return 1; +- D("dmin %ld dmax %ld", (_P64)dmin, (_P64)dmax); ++ D("dmin %lld dmax %lld", (_P64)dmin, (_P64)dmax); + dst->d[0] = dmin; + dst->d[1] = dmax; + dst->d[2] = dmax - dmin; +@@ -1592,7 +1592,7 @@ exp_delay_run(struct _qs *q, struct _cfg + { + uint64_t *t = (uint64_t *)arg->arg; + q->cur_delay = t[my_random24() & (PTS_D_EXP - 1)]; +- RD(5, "delay %lu", (_P64)q->cur_delay); ++ RD(5, "delay %llu", (_P64)q->cur_delay); + return 0; + } + +@@ -1783,7 +1783,7 @@ const_ber_parse(struct _qs *q, struct _c + plr[i] = mask; + #if 0 + if (i>= 60) // && plr[i] < mask/2) +- RD(50,"%4d: %le %ld", i, 1.0 - cur, (_P64)plr[i]); ++ RD(50,"%4d: %le %lld", i, 1.0 - cur, (_P64)plr[i]); + #endif + } + dst->d[0] = ber * (mask + 1); +Index: git/apps/pkt-gen/pkt-gen.c +=================================================================== +--- git.orig/apps/pkt-gen/pkt-gen.c ++++ git/apps/pkt-gen/pkt-gen.c +@@ -1319,7 +1319,7 @@ ping_body(void *data) + ts.tv_nsec += 1000000000; + ts.tv_sec--; + } +- if (0) D("seq %d/%lu delta %d.%09d", seq, sent, ++ if (0) D("seq %d/%llu delta %d.%09d", seq, sent, + (int)ts.tv_sec, (int)ts.tv_nsec); + t_cur = ts.tv_sec * 1000000000UL + ts.tv_nsec; + if (t_cur < t_min) +@@ -1401,7 +1401,7 @@ pong_body(void *data) + return NULL; + } + if (n > 0) +- D("understood ponger %lu but don't know how to do it", n); ++ D("understood ponger %llu but don't know how to do it", n); + while (!targ->cancel && (n == 0 || sent < n)) { + uint32_t txcur, txavail; + //#define BUSYWAIT
meta-networking/recipes-kernel/netmap/netmap-modules_git.bb +6 -3
@@ -13,6 +13,9 @@ EXTRA_OECONF = "--kernel-dir=${STAGING_KERNEL_BUILDDIR} \ --kernel-sources=${STAGING_KERNEL_DIR} \ --install-mod-path=${D} \ --driver-suffix="-netmap" \ + --cc='${CC}' \ + --ld='${LD}' \ + --no-apps \ " # The driver builds are optional, but for deterministic builds,
@@ -85,8 +88,8 @@ do_compile () { do_install () { cd ${S}/LINUX - oe_runmake install + oe_runmake install DESTDIR=${D} } -# http://errors.yoctoproject.org/Errors/Details/83335/ -PNBLACKLIST[netmap-modules] ?= "BROKEN: not compatible with default kernel version 4.8 - the recipe will be removed on 2017-09-01 unless the issue is fixed" +FILES_${PN}-doc += "${prefix}/local/share" +FILES_${PN}-dev += "${prefix}/local/include"
meta-networking/recipes-kernel/netmap/netmap.inc +4 -4
@@ -2,15 +2,15 @@ SUMMARY = "netmap and VALE - very fast packet I/O from userspace (FreeBSD/Linux) DESCRIPTION= "NETMAP is a framework for very fast packet I/O from userspace. VALE is an equally fast in-kernel software switch using the netmap API. Both are implemented as a single kernel module for FreeBSD and Linux, and can deal with line rate on real or emulated 10 Gbit ports." SECTION = "networking" HOMEPAGE = "http://code.google.com/p/netmap/" -LICENSE = "GPLv2+" +LICENSE = "BSD-2-Clause" -LIC_FILES_CHKSUM = "file://README;beginline=13;endline=14;md5=56ae0b9c7ba0476ab9098de94c2714d6" +LIC_FILES_CHKSUM = "file://LICENSE;md5=388c13686fc84f281413c82fa325965f" -SRCREV = "da9e19e69b84e4f6f8ae125f8d01b42a4abade6a" +SRCREV = "86312f06626f33f150514eaab42a2d2a8432c4ed" PV = "master+git${SRCPV}" SRC_URI = "git://github.com/luigirizzo/netmap.git" -SRC_URI += "file://makefile_fixup.patch" +SRC_URI += "file://gcc_6_fix.patch" S = "${WORKDIR}/git"
meta-networking/recipes-kernel/netmap/netmap_git.bb +2 -6
@@ -7,12 +7,10 @@ EXTRA_OECONF = "--kernel-dir=${STAGING_KERNEL_BUILDDIR} \ --kernel-sources=${STAGING_KERNEL_DIR} \ --no-drivers \ --disable-generic \ - --prefix=${prefix} \ --destdir=${D} \ --cc='${CC}' \ --ld='${LD}' \ " -SRC_URI += "file://0001-testmmap-fix-compile-issue-with-gcc-5.x.patch" do_configure () { cd ${S}/LINUX
@@ -29,9 +27,7 @@ do_install () { make install-apps DESTDIR=${D} } -FILES_${PN} += "${bindir}" +FILES_${PN} += "${prefix}/local/bin" +FILES_${PN}-doc += "${prefix}/local/share" RDEPENDS_${PN} = "kernel-module-netmap" RRECOMMENDS_${PN} = "kernel-module-netmap" - -# http://errors.yoctoproject.org/Errors/Details/69733/ -PNBLACKLIST[netmap] ?= "BROKEN: Tries to build kernel module and fails, either it should be disabled or there should be dependency on kernel like in netmap-modules - the recipe will be removed on 2017-09-01 unless the issue is fixed"
Signature · 1 line
2.12.2
PATCH 2/32 lowpan-tools: Fix build with clang
--- ...-src-iz.c-Undef-dprintf-before-redefining.patch | 27 ++++++++++++++++++++++ .../lowpan-tools/lowpan-tools_git.bb | 1 + 2 files changed, 28 insertions(+) create mode 100644 meta-networking/recipes-support/lowpan-tools/lowpan-tools/0001-src-iz.c-Undef-dprintf-before-redefining.patch
meta-networking/recipes-support/lowpan-tools/lowpan-tools/0001-src-iz.c-Undef-dprintf-before-redefining.patch new file +27 -0
@@ -0,0 +1,27 @@ +From ad088233608ba2205511da4f270f8ba29844b84c Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Sat, 8 Apr 2017 09:02:02 -0700 +Subject: [PATCH] src/iz.c: Undef dprintf before redefining + +Clang is picky and warns about macros redefinition + +Signed-off-by: Khem Raj <[email protected]> +--- + src/iz.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/iz.c b/src/iz.c +index 32be1a8..886f0a5 100644 +--- a/src/iz.c ++++ b/src/iz.c +@@ -60,6 +60,7 @@ static int iz_seq = 0; + /* Parsed options */ + static int iz_debug = 0; + ++#undef dprintf + #define dprintf(lvl, fmt...) \ + do { \ + if (iz_debug >= lvl) \ +-- +2.12.2 +
meta-networking/recipes-support/lowpan-tools/lowpan-tools_git.bb +1 -0
@@ -12,6 +12,7 @@ SRC_URI = "git://git.code.sf.net/p/linux-zigbee/linux-zigbee \ file://no-help2man.patch \ file://0001-Fix-build-errors-with-clang.patch \ file://0001-addrdb-coord-config-parse.y-add-missing-time.h-inclu.patch \ + file://0001-src-iz.c-Undef-dprintf-before-redefining.patch \ " SRCREV = "38f42dbfce9e13629263db3bd3b81f14c69bb733"
Signature · 1 line
2.12.2
PATCH 3/32 ez-ipupdate: Fix formatting security warnings
In reply to Khem Raj--- .../ez-ipupdate/ez-ipupdate_3.0.11b7.bb | 1 + .../recipes-connectivity/ez-ipupdate/files/wformat.patch | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 meta-networking/recipes-connectivity/ez-ipupdate/files/wformat.patch
meta-networking/recipes-connectivity/ez-ipupdate/ez-ipupdate_3.0.11b7.bb +1 -0
@@ -8,6 +8,7 @@ SRC_URI = "http://sourceforge.net/projects/ez-ipupdate/files/${BPN}/${PV}/${BPN} file://Makefile.am.patch \ file://cache_file.c.patch \ file://conf_file.c.patch \ + file://wformat.patch \ " SRC_URI[md5sum] = "525be4550b4461fdf105aed8e753b020" SRC_URI[sha256sum] = "a15ec0dc0b78ec7578360987c68e43a67bc8d3591cbf528a323588830ae22c20"
meta-networking/recipes-connectivity/ez-ipupdate/files/wformat.patch new file +13 -0
@@ -0,0 +1,13 @@ +Index: ez-ipupdate-3.0.11b7/ez-ipupdate.c +=================================================================== +--- ez-ipupdate-3.0.11b7.orig/ez-ipupdate.c ++++ ez-ipupdate-3.0.11b7/ez-ipupdate.c +@@ -798,7 +798,7 @@ void show_message(char *fmt, ...) + sprintf(buf, "message incomplete because your OS sucks: %s\n", fmt); + #endif + +- syslog(LOG_NOTICE, buf); ++ syslog(LOG_NOTICE, "%s", buf); + } + else + {
Signature · 1 line
2.12.2
PATCH 4/32 libnetfilter-conntrack: Upgrade to 1.0.6
In reply to Khem Raj---
.../libnetfilter/files/replace-VLAs-in-union.patch | 89 ----------------------
...ck_1.0.4.bb => libnetfilter-conntrack_1.0.6.bb} | 5 +-
2 files changed, 2 insertions(+), 92 deletions(-)
delete mode 100644 meta-networking/recipes-filter/libnetfilter/files/replace-VLAs-in-union.patch
rename meta-networking/recipes-filter/libnetfilter/{libnetfilter-conntrack_1.0.4.bb => libnetfilter-conntrack_1.0.6.bb} (75%)meta-networking/recipes-filter/libnetfilter/files/replace-VLAs-in-union.patch deleted +0 -89
@@ -1,89 +0,0 @@ -VLAs in structs and unions (non-PODs) is unsupported in non-gcc compilers -therefore convert it to not use VLAs instead use fixed arrays - -Signed-off-by: Khem Raj <[email protected]> -Upstream-Status: Pending -Index: libnetfilter_conntrack-1.0.4/src/conntrack/api.c -=================================================================== ---- libnetfilter_conntrack-1.0.4.orig/src/conntrack/api.c -+++ libnetfilter_conntrack-1.0.4/src/conntrack/api.c -@@ -954,16 +954,15 @@ int nfct_query(struct nfct_handle *h, - const enum nf_conntrack_query qt, - const void *data) - { -- size_t size = 4096; /* enough for now */ - union { -- char buffer[size]; -+ char buffer[4096]; - struct nfnlhdr req; - } u; - - assert(h != NULL); - assert(data != NULL); - -- if (__build_query_ct(h->nfnlssh_ct, qt, data, &u.req, size) == -1) -+ if (__build_query_ct(h->nfnlssh_ct, qt, data, &u.req, 4096) == -1) - return -1; - - return nfnl_query(h->nfnlh, &u.req.nlh); -@@ -986,16 +985,15 @@ int nfct_send(struct nfct_handle *h, - const enum nf_conntrack_query qt, - const void *data) - { -- size_t size = 4096; /* enough for now */ - union { -- char buffer[size]; -+ char buffer[4096]; - struct nfnlhdr req; - } u; - - assert(h != NULL); - assert(data != NULL); - -- if (__build_query_ct(h->nfnlssh_ct, qt, data, &u.req, size) == -1) -+ if (__build_query_ct(h->nfnlssh_ct, qt, data, &u.req, 4096) == -1) - return -1; - - return nfnl_send(h->nfnlh, &u.req.nlh); -Index: libnetfilter_conntrack-1.0.4/src/expect/api.c -=================================================================== ---- libnetfilter_conntrack-1.0.4.orig/src/expect/api.c -+++ libnetfilter_conntrack-1.0.4/src/expect/api.c -@@ -669,16 +669,15 @@ int nfexp_query(struct nfct_handle *h, - const enum nf_conntrack_query qt, - const void *data) - { -- size_t size = 4096; /* enough for now */ - union { -- char buffer[size]; -+ char buffer[4096]; - struct nfnlhdr req; - } u; - - assert(h != NULL); - assert(data != NULL); - -- if (__build_query_exp(h->nfnlssh_exp, qt, data, &u.req, size) == -1) -+ if (__build_query_exp(h->nfnlssh_exp, qt, data, &u.req, 4096) == -1) - return -1; - - return nfnl_query(h->nfnlh, &u.req.nlh); -@@ -701,16 +700,15 @@ int nfexp_send(struct nfct_handle *h, - const enum nf_conntrack_query qt, - const void *data) - { -- size_t size = 4096; /* enough for now */ - union { -- char buffer[size]; -+ char buffer[4096]; - struct nfnlhdr req; - } u; - - assert(h != NULL); - assert(data != NULL); - -- if (__build_query_exp(h->nfnlssh_exp, qt, data, &u.req, size) == -1) -+ if (__build_query_exp(h->nfnlssh_exp, qt, data, &u.req, 4096) == -1) - return -1; - - return nfnl_send(h->nfnlh, &u.req.nlh);
meta-networking/recipes-filter/libnetfilter/libnetfilter-conntrack_1.0.6.bb renamed from meta-networking/recipes-filter/libnetfilter/libnetfilter-conntrack_1.0.4.bb +2 -3
@@ -7,10 +7,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b" DEPENDS = "libnfnetlink libmnl" SRC_URI = "http://www.netfilter.org/projects/libnetfilter_conntrack/files/libnetfilter_conntrack-${PV}.tar.bz2;name=tar \ - file://replace-VLAs-in-union.patch \ " -SRC_URI[tar.md5sum] = "18cf80c4b339a3285e78822dbd4f08d7" -SRC_URI[tar.sha256sum] = "d9ec4a3caf49417f2b0a2d8d44249133e8c3ec78c757b7eb8c273f1cb6929c7d" +SRC_URI[tar.md5sum] = "7139c5f408dd9606ffecfd5dcda8175b" +SRC_URI[tar.sha256sum] = "efcc08021284e75f4d96d3581c5155a11f08fd63316b1938cbcb269c87f37feb" S = "${WORKDIR}/libnetfilter_conntrack-${PV}"
Signature · 1 line
2.12.2
PATCH 5/32 conntrack-tools: Upgrade to 1.4.4
In reply to Khem Raj---
...ack-tools_1.4.2.bb => conntrack-tools_1.4.4.bb} | 17 +++--
...build-fix-crash-when-optional-kernel-modu.patch | 85 ----------------------
2 files changed, 10 insertions(+), 92 deletions(-)
rename meta-networking/recipes-filter/conntrack-tools/{conntrack-tools_1.4.2.bb => conntrack-tools_1.4.4.bb} (70%)
delete mode 100644 meta-networking/recipes-filter/conntrack-tools/files/0001-conntrackd-build-fix-crash-when-optional-kernel-modu.patchmeta-networking/recipes-filter/conntrack-tools/conntrack-tools_1.4.4.bb renamed from meta-networking/recipes-filter/conntrack-tools/conntrack-tools_1.4.2.bb +10 -7
@@ -2,26 +2,29 @@ SUMMARY = "Connection tracking userspace tools for Linux" SECTION = "net" LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b" + DEPENDS = "libnfnetlink libnetfilter-conntrack libnetfilter-cttimeout \ libnetfilter-cthelper libnetfilter-queue bison-native" -SRC_URI = " \ - http://www.netfilter.org/projects/conntrack-tools/files/conntrack-tools-${PV}.tar.bz2;name=tar \ +DEPENDS_append_libc-musl = " libtirpc" +CFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc" +LDFLAGS_append_libc-musl = " -ltirpc" + +SRC_URI = "http://www.netfilter.org/projects/conntrack-tools/files/conntrack-tools-${PV}.tar.bz2;name=tar \ file://conntrack-failover \ file://init \ - file://0001-conntrackd-build-fix-crash-when-optional-kernel-modu.patch \ " -SRC_URI[tar.md5sum] = "b1f9d006e7bf000a77395ff7cd3fac16" -SRC_URI[tar.sha256sum] = "e5c423dc077f9ca8767eaa6cf40446943905711c6a8fe27f9cc1977d4d6aa11e" +SRC_URI[tar.md5sum] = "acd9e0b27cf16ae3092ba900e4d7560e" +SRC_URI[tar.sha256sum] = "b7caf4fcc4c03575df57d25e5216584d597fd916c891f191dac616ce68bdba6c" -inherit autotools-brokensep update-rc.d pkgconfig +inherit autotools update-rc.d pkgconfig INITSCRIPT_NAME = "conntrackd" do_install_append() { install -d ${D}/${sysconfdir}/conntrackd install -d ${D}/${sysconfdir}/init.d - install -m 0644 doc/sync/ftfw/conntrackd.conf ${D}/${sysconfdir}/conntrackd/conntrackd.conf.sample + install -m 0644 ${S}/doc/sync/ftfw/conntrackd.conf ${D}/${sysconfdir}/conntrackd/conntrackd.conf.sample install -m 0755 ${WORKDIR}/conntrack-failover ${D}/${sysconfdir}/init.d/conntrack-failover install -m 0755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/conntrackd
meta-networking/recipes-filter/conntrack-tools/files/0001-conntrackd-build-fix-crash-when-optional-kernel-modu.patch deleted +0 -85
85 lines not on this page · raw message
Signature · 1 line
2.12.2
PATCH 6/32 libnetfilter-acct: Fix build with clang
In reply to Khem Raj--- ...-the-define-visivility-attribute-together.patch | 255 +++++++++++++++++++++ .../libnetfilter/libnetfilter-acct_1.0.3.bb | 4 +- 2 files changed, 258 insertions(+), 1 deletion(-) create mode 100644 meta-networking/recipes-filter/libnetfilter/files/0001-libnetfilter-acct-Declare-the-define-visivility-attribute-together.patch
meta-networking/recipes-filter/libnetfilter/files/0001-libnetfilter-acct-Declare-the-define-visivility-attribute-together.patch new file +255 -0
@@ -0,0 +1,255 @@ +From f3e3e8fa703e88b76b22c5486277dfca3c85a24b Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Mon, 10 Apr 2017 14:56:18 -0700 +Subject: [PATCH] Declare the define visivility 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 + +Signed-off-by: Khem Raj <[email protected]> +--- + doxygen.cfg.in | 2 +- + src/internal.h | 5 ++--- + src/libnetfilter_acct.c | 41 ++++++++++++++--------------------------- + 3 files changed, 17 insertions(+), 31 deletions(-) + +diff --git a/doxygen.cfg.in b/doxygen.cfg.in +index 7f4bd04..fe64d48 100644 +--- a/doxygen.cfg.in ++++ b/doxygen.cfg.in +@@ -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 +diff --git a/src/internal.h b/src/internal.h +index f0cc2e1..e5c5ffd 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 __EXPORT __attribute__((visibility("default"))) + #else +-# define EXPORT_SYMBOL ++# define __EXPORT + #endif + + #include <endian.h> +diff --git a/src/libnetfilter_acct.c b/src/libnetfilter_acct.c +index b0bcf67..0220d14 100644 +--- a/src/libnetfilter_acct.c ++++ b/src/libnetfilter_acct.c +@@ -76,21 +76,19 @@ struct nfacct { + * In case of success, this function returns a valid pointer, otherwise NULL + * s returned and errno is appropriately set. + */ +-struct nfacct *nfacct_alloc(void) ++struct nfacct __EXPORT *nfacct_alloc(void) + { + return calloc(1, sizeof(struct nfacct)); + } +-EXPORT_SYMBOL(nfacct_alloc); + + /** + * nfacct_free - release one accounting object + * \param nfacct pointer to the accounting object + */ +-void nfacct_free(struct nfacct *nfacct) ++void __EXPORT nfacct_free(struct nfacct *nfacct) + { + free(nfacct); + } +-EXPORT_SYMBOL(nfacct_free); + + /** + * nfacct_attr_set - set one attribute of the accounting object +@@ -98,7 +96,7 @@ EXPORT_SYMBOL(nfacct_free); + * \param type attribute type you want to set + * \param data pointer to data that will be used to set this attribute + */ +-void ++void __EXPORT + nfacct_attr_set(struct nfacct *nfacct, enum nfacct_attr_type type, + const void *data) + { +@@ -126,7 +124,6 @@ nfacct_attr_set(struct nfacct *nfacct, enum nfacct_attr_type type, + break; + } + } +-EXPORT_SYMBOL(nfacct_attr_set); + + /** + * nfacct_attr_set_str - set one attribute the accounting object +@@ -134,13 +131,12 @@ EXPORT_SYMBOL(nfacct_attr_set); + * \param type attribute type you want to set + * \param name string that will be used to set this attribute + */ +-void ++void __EXPORT + nfacct_attr_set_str(struct nfacct *nfacct, enum nfacct_attr_type type, + const char *name) + { + nfacct_attr_set(nfacct, type, name); + } +-EXPORT_SYMBOL(nfacct_attr_set_str); + + /** + * nfacct_attr_set_u64 - set one attribute the accounting object +@@ -148,20 +144,19 @@ EXPORT_SYMBOL(nfacct_attr_set_str); + * \param type attribute type you want to set + * \param value unsigned 64-bits integer + */ +-void ++void __EXPORT + nfacct_attr_set_u64(struct nfacct *nfacct, enum nfacct_attr_type type, + uint64_t value) + { + nfacct_attr_set(nfacct, type, &value); + } +-EXPORT_SYMBOL(nfacct_attr_set_u64); + + /** + * nfacct_attr_unset - unset one attribute the accounting object + * \param nfacct pointer to the accounting object + * \param type attribute type you want to set + */ +-void ++void __EXPORT + nfacct_attr_unset(struct nfacct *nfacct, enum nfacct_attr_type type) + { + switch(type) { +@@ -182,7 +177,6 @@ nfacct_attr_unset(struct nfacct *nfacct, enum nfacct_attr_type type) + break; + } + } +-EXPORT_SYMBOL(nfacct_attr_unset); + + /** + * nfacct_attr_get - get one attribute the accounting object +@@ -192,7 +186,7 @@ EXPORT_SYMBOL(nfacct_attr_unset); + * This function returns a valid pointer to the attribute data. If a + * unsupported attribute is used, this returns NULL. + */ +-const void *nfacct_attr_get(struct nfacct *nfacct, enum nfacct_attr_type type) ++const void __EXPORT *nfacct_attr_get(struct nfacct *nfacct, enum nfacct_attr_type type) + { + const void *ret = NULL; + +@@ -220,7 +214,6 @@ const void *nfacct_attr_get(struct nfacct *nfacct, enum nfacct_attr_type type) + } + return ret; + } +-EXPORT_SYMBOL(nfacct_attr_get); + + /** + * nfacct_attr_get_str - get one attribute the accounting object +@@ -230,12 +223,11 @@ EXPORT_SYMBOL(nfacct_attr_get); + * This function returns a valid pointer to the beginning of the string. + * If the attribute is unsupported, this returns NULL. + */ +-const char * ++const char __EXPORT * + nfacct_attr_get_str(struct nfacct *nfacct, enum nfacct_attr_type type) + { + return nfacct_attr_get(nfacct, type); + } +-EXPORT_SYMBOL(nfacct_attr_get_str); + + /** + * nfacct_attr_get_u64 - get one attribute the accounting object +@@ -245,12 +237,11 @@ EXPORT_SYMBOL(nfacct_attr_get_str); + * This function returns a unsigned 64-bits integer. If the attribute is + * unsupported, this returns NULL. + */ +-uint64_t nfacct_attr_get_u64(struct nfacct *nfacct, enum nfacct_attr_type type) ++uint64_t __EXPORT nfacct_attr_get_u64(struct nfacct *nfacct, enum nfacct_attr_type type) + { + const void *ret = nfacct_attr_get(nfacct, type); + return ret ? *((uint64_t *)ret) : 0; + } +-EXPORT_SYMBOL(nfacct_attr_get_u64); + + static int + nfacct_snprintf_plain(char *buf, size_t rem, struct nfacct *nfacct, +@@ -424,8 +415,8 @@ err: + * This function returns -1 in case that some mandatory attributes are + * missing. On sucess, it returns 0. + */ +-int nfacct_snprintf(char *buf, size_t size, struct nfacct *nfacct, +- uint16_t type, uint16_t flags) ++int __EXPORT nfacct_snprintf(char *buf, size_t size, struct nfacct *nfacct, ++ uint16_t type, uint16_t flags) + { + int ret = 0; + +@@ -445,7 +436,6 @@ int nfacct_snprintf(char *buf, size_t size, struct nfacct *nfacct, + } + return ret; + } +-EXPORT_SYMBOL(nfacct_snprintf); + + /** + * @} +@@ -484,7 +474,7 @@ EXPORT_SYMBOL(nfacct_snprintf); + * - Command NFNL_MSG_ACCT_DEL, to delete one specific nfacct object (if + * unused, otherwise you hit EBUSY). + */ +-struct nlmsghdr * ++struct nlmsghdr __EXPORT * + nfacct_nlmsg_build_hdr(char *buf, uint8_t cmd, uint16_t flags, uint32_t seq) + { + struct nlmsghdr *nlh; +@@ -502,14 +492,13 @@ nfacct_nlmsg_build_hdr(char *buf, uint8_t cmd, uint16_t flags, uint32_t seq) + + return nlh; + } +-EXPORT_SYMBOL(nfacct_nlmsg_build_hdr); + + /** + * nfacct_nlmsg_build_payload - build payload from accounting object + * \param nlh: netlink message that you want to use to add the payload. + * \param nfacct: pointer to a accounting object + */ +-void nfacct_nlmsg_build_payload(struct nlmsghdr *nlh, struct nfacct *nfacct) ++void __EXPORT nfacct_nlmsg_build_payload(struct nlmsghdr *nlh, struct nfacct *nfacct) + { + if (nfacct->bitset & (1 << NFACCT_ATTR_NAME)) + mnl_attr_put_strz(nlh, NFACCT_NAME, nfacct->name); +@@ -526,7 +515,6 @@ void nfacct_nlmsg_build_payload(struct nlmsghdr *nlh, struct nfacct *nfacct) + if (nfacct->bitset & (1 << NFACCT_ATTR_QUOTA)) + mnl_attr_put_u64(nlh, NFACCT_QUOTA, htobe64(nfacct->quota)); + } +-EXPORT_SYMBOL(nfacct_nlmsg_build_payload); + + static int nfacct_nlmsg_parse_attr_cb(const struct nlattr *attr, void *data) + { +@@ -563,7 +551,7 @@ static int nfacct_nlmsg_parse_attr_cb(const struct nlattr *attr, void *data) + * This function returns -1 in case that some mandatory attributes are + * missing. On sucess, it returns 0. + */ +-int ++int __EXPORT + nfacct_nlmsg_parse_payload(const struct nlmsghdr *nlh, struct nfacct *nfacct) + { + struct nlattr *tb[NFACCT_MAX+1] = {}; +@@ -589,7 +577,6 @@ nfacct_nlmsg_parse_payload(const struct nlmsghdr *nlh, struct nfacct *nfacct) + + return 0; + } +-EXPORT_SYMBOL(nfacct_nlmsg_parse_payload); + + /** + * @} +-- +2.12.2 +
meta-networking/recipes-filter/libnetfilter/libnetfilter-acct_1.0.3.bb +3 -1
@@ -6,7 +6,9 @@ LICENSE = "LGPL-2.1" LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" DEPENDS = "libnfnetlink libmnl" -SRC_URI = "http://ftp.netfilter.org/pub/libnetfilter_acct/libnetfilter_acct-1.0.3.tar.bz2" +SRC_URI = "http://ftp.netfilter.org/pub/libnetfilter_acct/libnetfilter_acct-1.0.3.tar.bz2 \ + file://0001-libnetfilter-acct-Declare-the-define-visivility-attribute-together.patch \ +" SRC_URI[md5sum] = "814b2972b2f5c740ff87510bc109168b" SRC_URI[sha256sum] = "4250ceef3efe2034f4ac05906c3ee427db31b9b0a2df41b2744f4bf79a959a1a"
Signature · 1 line
2.12.2
PATCH 7/32 libnetfilter-queue: Fix symbol visibility bug found with clang
In reply to Khem Raj--- ...-the-define-visivility-attribute-together.patch | 1229 ++++++++++++++++++++ .../libnetfilter/libnetfilter-queue_1.0.2.bb | 1 + 2 files changed, 1230 insertions(+) create mode 100644 meta-networking/recipes-filter/libnetfilter/files/0001-libnetfilter-queue-Declare-the-define-visivility-attribute-together.patch
meta-networking/recipes-filter/libnetfilter/files/0001-libnetfilter-queue-Declare-the-define-visivility-attribute-together.patch new file +1229 -0
@@ -0,0 +1,1229 @@ +From 06562244ac4a1a61e1a2c6b219a517658f7349bf Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Mon, 10 Apr 2017 12:09:41 -0700 +Subject: [PATCH] Declare the define visivility 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 + +Signed-off-by: Khem Raj <[email protected]> +--- + doxygen.cfg.in | 2 +- + src/extra/ipv4.c | 15 +++---- + src/extra/ipv6.c | 9 ++-- + src/extra/pktbuff.c | 42 ++++++------------ + src/extra/tcp.c | 21 +++------ + src/extra/udp.c | 21 +++------ + src/internal.h | 5 +-- + src/libnetfilter_queue.c | 108 ++++++++++++++++------------------------------- + src/nlmsg.c | 21 +++------ + 9 files changed, 82 insertions(+), 162 deletions(-) + +diff --git a/doxygen.cfg.in b/doxygen.cfg.in +index a7378ca..659abee 100644 +--- a/doxygen.cfg.in ++++ b/doxygen.cfg.in +@@ -72,7 +72,7 @@ RECURSIVE = YES + EXCLUDE = + EXCLUDE_SYMLINKS = NO + EXCLUDE_PATTERNS = +-EXCLUDE_SYMBOLS = EXPORT_SYMBOL ++EXCLUDE_SYMBOLS = + EXAMPLE_PATH = + EXAMPLE_PATTERNS = + EXAMPLE_RECURSIVE = NO +diff --git a/src/extra/ipv4.c b/src/extra/ipv4.c +index a93d113..56d5dc7 100644 +--- a/src/extra/ipv4.c ++++ b/src/extra/ipv4.c +@@ -32,7 +32,7 @@ + * This funcion returns NULL if the IPv4 is malformed or the protocol version + * is not 4. On success, it returns a valid pointer to the IPv4 header. + */ +-struct iphdr *nfq_ip_get_hdr(struct pkt_buff *pktb) ++struct iphdr __EXPORTED *nfq_ip_get_hdr(struct pkt_buff *pktb) + { + struct iphdr *iph; + unsigned int pktlen = pktb->tail - pktb->network_header; +@@ -53,14 +53,13 @@ struct iphdr *nfq_ip_get_hdr(struct pkt_buff *pktb) + + return iph; + } +-EXPORT_SYMBOL(nfq_ip_get_hdr); + + /** + * nfq_ip_set_transport_header - set transport header + * \param pktb: pointer to network packet buffer + * \param iph: pointer to the IPv4 header + */ +-int nfq_ip_set_transport_header(struct pkt_buff *pktb, struct iphdr *iph) ++int __EXPORTED nfq_ip_set_transport_header(struct pkt_buff *pktb, struct iphdr *iph) + { + int doff = iph->ihl * 4; + +@@ -71,7 +70,6 @@ int nfq_ip_set_transport_header(struct pkt_buff *pktb, struct iphdr *iph) + pktb->transport_header = pktb->network_header + doff; + return 0; + } +-EXPORT_SYMBOL(nfq_ip_set_transport_header); + + /** + * nfq_ip_set_checksum - set IPv4 checksum +@@ -80,14 +78,13 @@ EXPORT_SYMBOL(nfq_ip_set_transport_header); + * \note Call to this function if you modified the IPv4 header to update the + * checksum. + */ +-void nfq_ip_set_checksum(struct iphdr *iph) ++void __EXPORTED nfq_ip_set_checksum(struct iphdr *iph) + { + uint32_t iph_len = iph->ihl * 4; + + iph->check = 0; + iph->check = nfq_checksum(0, (uint16_t *)iph, iph_len); + } +-EXPORT_SYMBOL(nfq_ip_set_checksum); + + /** + * nfq_ip_mangle - mangle IPv4 packet buffer +@@ -100,7 +97,7 @@ EXPORT_SYMBOL(nfq_ip_set_checksum); + * + * \note This function recalculates the IPv4 checksum (if needed). + */ +-int nfq_ip_mangle(struct pkt_buff *pkt, unsigned int dataoff, ++int __EXPORTED nfq_ip_mangle(struct pkt_buff *pkt, unsigned int dataoff, + unsigned int match_offset, unsigned int match_len, + const char *rep_buffer, unsigned int rep_len) + { +@@ -116,7 +113,6 @@ int nfq_ip_mangle(struct pkt_buff *pkt, unsigned int dataoff, + + return 1; + } +-EXPORT_SYMBOL(nfq_ip_mangle); + + /** + * nfq_pkt_snprintf_ip - print IPv4 header into buffer in iptables LOG format +@@ -128,7 +124,7 @@ EXPORT_SYMBOL(nfq_ip_mangle); + * case that there is enough room in the buffer. Read snprintf manpage for more + * information to know more about this strange behaviour. + */ +-int nfq_ip_snprintf(char *buf, size_t size, const struct iphdr *iph) ++int __EXPORTED nfq_ip_snprintf(char *buf, size_t size, const struct iphdr *iph) + { + int ret; + struct in_addr src = { iph->saddr }; +@@ -147,7 +143,6 @@ int nfq_ip_snprintf(char *buf, size_t size, const struct iphdr *iph) + + return ret; + } +-EXPORT_SYMBOL(nfq_ip_snprintf); + + /** + * @} +diff --git a/src/extra/ipv6.c b/src/extra/ipv6.c +index 7c5dc9b..6641c6b 100644 +--- a/src/extra/ipv6.c ++++ b/src/extra/ipv6.c +@@ -33,7 +33,7 @@ + * This funcion returns NULL if an invalid header is found. On sucess, it + * returns a valid pointer to the header. + */ +-struct ip6_hdr *nfq_ip6_get_hdr(struct pkt_buff *pktb) ++struct ip6_hdr __EXPORTED *nfq_ip6_get_hdr(struct pkt_buff *pktb) + { + struct ip6_hdr *ip6h; + unsigned int pktlen = pktb->tail - pktb->network_header; +@@ -50,7 +50,6 @@ struct ip6_hdr *nfq_ip6_get_hdr(struct pkt_buff *pktb) + + return ip6h; + } +-EXPORT_SYMBOL(nfq_ip6_get_hdr); + + /** + * nfq_ip6_set_transport_header - set transport header pointer for IPv6 packet +@@ -61,7 +60,7 @@ EXPORT_SYMBOL(nfq_ip6_get_hdr); + * This function returns 1 if the protocol has been found and the transport + * header has been set. Otherwise, it returns 0. + */ +-int nfq_ip6_set_transport_header(struct pkt_buff *pktb, struct ip6_hdr *ip6h, ++int __EXPORTED nfq_ip6_set_transport_header(struct pkt_buff *pktb, struct ip6_hdr *ip6h, + uint8_t target) + { + uint8_t nexthdr = ip6h->ip6_nxt; +@@ -115,7 +114,6 @@ int nfq_ip6_set_transport_header(struct pkt_buff *pktb, struct ip6_hdr *ip6h, + pktb->transport_header = cur; + return cur ? 1 : 0; + } +-EXPORT_SYMBOL(nfq_ip6_set_transport_header); + + /** + * nfq_ip6_snprintf - print IPv6 header into one buffer in iptables LOG format +@@ -124,7 +122,7 @@ EXPORT_SYMBOL(nfq_ip6_set_transport_header); + * \param ip6_hdr: pointer to a valid IPv6 header. + * + */ +-int nfq_ip6_snprintf(char *buf, size_t size, const struct ip6_hdr *ip6h) ++int __EXPORTED nfq_ip6_snprintf(char *buf, size_t size, const struct ip6_hdr *ip6h) + { + int ret; + char src[INET6_ADDRSTRLEN]; +@@ -143,7 +141,6 @@ int nfq_ip6_snprintf(char *buf, size_t size, const struct ip6_hdr *ip6h) + + return ret; + } +-EXPORT_SYMBOL(nfq_ip6_snprintf); + + /** + * @} +diff --git a/src/extra/pktbuff.c b/src/extra/pktbuff.c +index 1c15a00..54d8244 100644 +--- a/src/extra/pktbuff.c ++++ b/src/extra/pktbuff.c +@@ -40,7 +40,7 @@ + * + * \return a pointer to a new queue handle or NULL on failure. + */ +-struct pkt_buff * ++struct pkt_buff __EXPORTED * + pktb_alloc(int family, void *data, size_t len, size_t extra) + { + struct pkt_buff *pktb; +@@ -84,120 +84,108 @@ pktb_alloc(int family, void *data, size_t len, size_t extra) + } + return pktb; + } +-EXPORT_SYMBOL(pktb_alloc); + + /** + * pktb_data - return pointer to the beginning of the packet buffer + * \param pktb Pointer to packet buffer + */ +-uint8_t *pktb_data(struct pkt_buff *pktb) ++uint8_t __EXPORTED *pktb_data(struct pkt_buff *pktb) + { + return pktb->data; + } +-EXPORT_SYMBOL(pktb_data); + + /** + * pktb_len - return length of the packet buffer + * \param pktb Pointer to packet buffer + */ +-uint32_t pktb_len(struct pkt_buff *pktb) ++uint32_t __EXPORTED pktb_len(struct pkt_buff *pktb) + { + return pktb->len; + } +-EXPORT_SYMBOL(pktb_len); + + /** + * pktb_free - release packet buffer + * \param pktb Pointer to packet buffer + */ +-void pktb_free(struct pkt_buff *pktb) ++void __EXPORTED pktb_free(struct pkt_buff *pktb) + { + free(pktb); + } +-EXPORT_SYMBOL(pktb_free); + + /** + * pktb_push - update pointer to the beginning of the packet buffer + * \param pktb Pointer to packet buffer + */ +-void pktb_push(struct pkt_buff *pktb, unsigned int len) ++void __EXPORTED pktb_push(struct pkt_buff *pktb, unsigned int len) + { + pktb->data -= len; + pktb->len += len; + } +-EXPORT_SYMBOL(pktb_push); + + /** + * pktb_pull - update pointer to the beginning of the packet buffer + * \param pktb Pointer to packet buffer + */ +-void pktb_pull(struct pkt_buff *pktb, unsigned int len) ++void __EXPORTED pktb_pull(struct pkt_buff *pktb, unsigned int len) + { + pktb->data += len; + pktb->len -= len; + } +-EXPORT_SYMBOL(pktb_pull); + + /** + * pktb_put - add extra bytes to the tail of the packet buffer + * \param pktb Pointer to packet buffer + */ +-void pktb_put(struct pkt_buff *pktb, unsigned int len) ++void __EXPORTED pktb_put(struct pkt_buff *pktb, unsigned int len) + { + pktb->tail += len; + pktb->len += len; + } +-EXPORT_SYMBOL(pktb_put); + + /** + * pktb_trim - set new length for this packet buffer + * \param pktb Pointer to packet buffer + */ +-void pktb_trim(struct pkt_buff *pktb, unsigned int len) ++void __EXPORTED pktb_trim(struct pkt_buff *pktb, unsigned int len) + { + pktb->len = len; + } +-EXPORT_SYMBOL(pktb_trim); + + /** + * pktb_tailroom - get room in bytes in the tail of the packet buffer + * \param pktb Pointer to packet buffer + */ +-unsigned int pktb_tailroom(struct pkt_buff *pktb) ++unsigned int __EXPORTED pktb_tailroom(struct pkt_buff *pktb) + { + return pktb->data_len - pktb->len; + } +-EXPORT_SYMBOL(pktb_tailroom); + + /** + * pktb_mac_header - return pointer to layer 2 header (if any) + * \param pktb Pointer to packet buffer + */ +-uint8_t *pktb_mac_header(struct pkt_buff *pktb) ++uint8_t __EXPORTED *pktb_mac_header(struct pkt_buff *pktb) + { + return pktb->mac_header; + } +-EXPORT_SYMBOL(pktb_mac_header); + + /** + * pktb_network_header - return pointer to layer 3 header + * \param pktb Pointer to packet buffer + */ +-uint8_t *pktb_network_header(struct pkt_buff *pktb) ++uint8_t __EXPORTED *pktb_network_header(struct pkt_buff *pktb) + { + return pktb->network_header; + } +-EXPORT_SYMBOL(pktb_network_header); + + /** + * pktb_transport_header - return pointer to layer 4 header (if any) + * \param pktb Pointer to packet buffer + */ +-uint8_t *pktb_transport_header(struct pkt_buff *pktb) ++uint8_t __EXPORTED *pktb_transport_header(struct pkt_buff *pktb) + { + return pktb->transport_header; + } +-EXPORT_SYMBOL(pktb_transport_header); + + static int pktb_expand_tail(struct pkt_buff *pkt, int extra) + { +@@ -224,7 +212,7 @@ static int enlarge_pkt(struct pkt_buff *pkt, unsigned int extra) + return 1; + } + +-int pktb_mangle(struct pkt_buff *pkt, ++int __EXPORTED pktb_mangle(struct pkt_buff *pkt, + unsigned int dataoff, + unsigned int match_offset, + unsigned int match_len, +@@ -258,17 +246,15 @@ int pktb_mangle(struct pkt_buff *pkt, + pkt->mangled = true; + return 1; + } +-EXPORT_SYMBOL(pktb_mangle); + + /** + * pktb_mangled - return true if packet has been mangled + * \param pktb Pointer to packet buffer + */ +-bool pktb_mangled(const struct pkt_buff *pkt) ++bool __EXPORTED pktb_mangled(const struct pkt_buff *pkt) + { + return pkt->mangled; + } +-EXPORT_SYMBOL(pktb_mangled); + + /** + * @} +diff --git a/src/extra/tcp.c b/src/extra/tcp.c +index d1cd79d..8038ce5 100644 +--- a/src/extra/tcp.c ++++ b/src/extra/tcp.c +@@ -40,7 +40,7 @@ + * \note You have to call nfq_ip_set_transport_header or + * nfq_ip6_set_transport_header first to access the TCP header. + */ +-struct tcphdr *nfq_tcp_get_hdr(struct pkt_buff *pktb) ++struct tcphdr __EXPORTED *nfq_tcp_get_hdr(struct pkt_buff *pktb) + { + if (pktb->transport_header == NULL) + return NULL; +@@ -51,14 +51,13 @@ struct tcphdr *nfq_tcp_get_hdr(struct pkt_buff *pktb) + + return (struct tcphdr *)pktb->transport_header; + } +-EXPORT_SYMBOL(nfq_tcp_get_hdr); + + /** + * nfq_tcp_get_payload - get the TCP packet payload + * \param tcph: pointer to the TCP header + * \param pktb: pointer to user-space network packet buffer + */ +-void *nfq_tcp_get_payload(struct tcphdr *tcph, struct pkt_buff *pktb) ++void __EXPORTED *nfq_tcp_get_payload(struct tcphdr *tcph, struct pkt_buff *pktb) + { + unsigned int len = tcph->doff * 4; + +@@ -72,47 +71,43 @@ void *nfq_tcp_get_payload(struct tcphdr *tcph, struct pkt_buff *pktb) + + return pktb->transport_header + len; + } +-EXPORT_SYMBOL(nfq_tcp_get_payload); + + /** + * nfq_tcp_get_payload_len - get the tcp packet payload + * \param tcph: pointer to the TCP header + * \param pktb: pointer to user-space network packet buffer + */ +-unsigned int ++unsigned int __EXPORTED + nfq_tcp_get_payload_len(struct tcphdr *tcph, struct pkt_buff *pktb) + { + return pktb->tail - pktb->transport_header; + } +-EXPORT_SYMBOL(nfq_tcp_get_payload_len); + + /** + * nfq_tcp_set_checksum_ipv4 - computes IPv4/TCP packet checksum + * \param tcph: pointer to the TCP header + * \param iph: pointer to the IPv4 header + */ +-void ++void __EXPORTED + nfq_tcp_compute_checksum_ipv4(struct tcphdr *tcph, struct iphdr *iph) + { + /* checksum field in header needs to be zero for calculation. */ + tcph->check = 0; + tcph->check = nfq_checksum_tcpudp_ipv4(iph); + } +-EXPORT_SYMBOL(nfq_tcp_compute_checksum_ipv4); + + /** + * nfq_tcp_set_checksum_ipv6 - computes IPv6/TCP packet checksum + * \param tcph: pointer to the TCP header + * \param iph: pointer to the IPv6 header + */ +-void ++void __EXPORTED + nfq_tcp_compute_checksum_ipv6(struct tcphdr *tcph, struct ip6_hdr *ip6h) + { + /* checksum field in header needs to be zero for calculation. */ + tcph->check = 0; + tcph->check = nfq_checksum_tcpudp_ipv6(ip6h, tcph); + } +-EXPORT_SYMBOL(nfq_tcp_compute_checksum_ipv6); + + /* + * The union cast uses a gcc extension to avoid aliasing problems +@@ -134,7 +129,7 @@ union tcp_word_hdr { + * \param tcp: pointer to a valid tcp header. + * + */ +-int nfq_tcp_snprintf(char *buf, size_t size, const struct tcphdr *tcph) ++int __EXPORTED nfq_tcp_snprintf(char *buf, size_t size, const struct tcphdr *tcph) + { + int ret, len = 0; + +@@ -177,7 +172,6 @@ int nfq_tcp_snprintf(char *buf, size_t size, const struct tcphdr *tcph) + + return ret; + } +-EXPORT_SYMBOL(nfq_tcp_snprintf); + + /** + * nfq_tcp_mangle_ipv4 - mangle TCP/IPv4 packet buffer +@@ -189,7 +183,7 @@ EXPORT_SYMBOL(nfq_tcp_snprintf); + * + * \note This function recalculates the IPv4 and TCP checksums for you. + */ +-int ++int __EXPORTED + nfq_tcp_mangle_ipv4(struct pkt_buff *pkt, + unsigned int match_offset, unsigned int match_len, + const char *rep_buffer, unsigned int rep_len) +@@ -208,7 +202,6 @@ nfq_tcp_mangle_ipv4(struct pkt_buff *pkt, + + return 1; + } +-EXPORT_SYMBOL(nfq_tcp_mangle_ipv4); + + /** + * @} +diff --git a/src/extra/udp.c b/src/extra/udp.c +index 8c44a66..99c8faa 100644 +--- a/src/extra/udp.c ++++ b/src/extra/udp.c +@@ -37,7 +37,7 @@ + * This function returns NULL if invalid UDP header is found. On success, + * it returns the UDP header. + */ +-struct udphdr *nfq_udp_get_hdr(struct pkt_buff *pktb) ++struct udphdr __EXPORTED *nfq_udp_get_hdr(struct pkt_buff *pktb) + { + if (pktb->transport_header == NULL) + return NULL; +@@ -48,14 +48,13 @@ struct udphdr *nfq_udp_get_hdr(struct pkt_buff *pktb) + + return (struct udphdr *)pktb->transport_header; + } +-EXPORT_SYMBOL(nfq_udp_get_hdr); + + /** + * nfq_udp_get_payload - get the UDP packet payload. + * \param udph: the pointer to the UDP header. + * \param tail: pointer to the tail of the packet + */ +-void *nfq_udp_get_payload(struct udphdr *udph, struct pkt_buff *pktb) ++void __EXPORTED *nfq_udp_get_payload(struct udphdr *udph, struct pkt_buff *pktb) + { + uint16_t len = ntohs(udph->len); + +@@ -69,17 +68,15 @@ void *nfq_udp_get_payload(struct udphdr *udph, struct pkt_buff *pktb) + + return pktb->transport_header + sizeof(struct udphdr); + } +-EXPORT_SYMBOL(nfq_udp_get_payload); + + /** + * nfq_udp_get_payload_len - get the udp packet payload. + * \param udp: the pointer to the udp header. + */ +-unsigned int nfq_udp_get_payload_len(struct udphdr *udph, struct pkt_buff *pktb) ++unsigned int __EXPORTED nfq_udp_get_payload_len(struct udphdr *udph, struct pkt_buff *pktb) + { + return pktb->tail - pktb->transport_header; + } +-EXPORT_SYMBOL(nfq_udp_get_payload_len); + + /** + * nfq_udp_set_checksum_ipv4 - computes a IPv4/TCP packet's segment +@@ -91,14 +88,13 @@ EXPORT_SYMBOL(nfq_udp_get_payload_len); + * \see nfq_pkt_compute_ip_checksum + * \see nfq_pkt_compute_udp_checksum + */ +-void ++void __EXPORTED + nfq_udp_compute_checksum_ipv4(struct udphdr *udph, struct iphdr *iph) + { + /* checksum field in header needs to be zero for calculation. */ + udph->check = 0; + udph->check = nfq_checksum_tcpudp_ipv4(iph); + } +-EXPORT_SYMBOL(nfq_udp_compute_checksum_ipv4); + + /** + * nfq_udp_set_checksum_ipv6 - computes a IPv6/TCP packet's segment +@@ -110,14 +106,13 @@ EXPORT_SYMBOL(nfq_udp_compute_checksum_ipv4); + * \see nfq_pkt_compute_ip_checksum + * \see nfq_pkt_compute_udp_checksum + */ +-void ++void __EXPORTED + nfq_udp_compute_checksum_ipv6(struct udphdr *udph, struct ip6_hdr *ip6h) + { + /* checksum field in header needs to be zero for calculation. */ + udph->check = 0; + udph->check = nfq_checksum_tcpudp_ipv6(ip6h, udph); + } +-EXPORT_SYMBOL(nfq_udp_compute_checksum_ipv6); + + /** + * nfq_tcp_mangle_ipv4 - mangle TCP/IPv4 packet buffer +@@ -129,7 +124,7 @@ EXPORT_SYMBOL(nfq_udp_compute_checksum_ipv6); + * + * \note This function recalculates the IPv4 and TCP checksums for you. + */ +-int ++int __EXPORTED + nfq_udp_mangle_ipv4(struct pkt_buff *pkt, + unsigned int match_offset, unsigned int match_len, + const char *rep_buffer, unsigned int rep_len) +@@ -148,7 +143,6 @@ nfq_udp_mangle_ipv4(struct pkt_buff *pkt, + + return 1; + } +-EXPORT_SYMBOL(nfq_udp_mangle_ipv4); + + /** + * nfq_pkt_snprintf_udp_hdr - print udp header into one buffer in a humnan +@@ -158,12 +152,11 @@ EXPORT_SYMBOL(nfq_udp_mangle_ipv4); + * \param udp: pointer to a valid udp header. + * + */ +-int nfq_udp_snprintf(char *buf, size_t size, const struct udphdr *udph) ++int __EXPORTED nfq_udp_snprintf(char *buf, size_t size, const struct udphdr *udph) + { + return snprintf(buf, size, "SPT=%u DPT=%u ", + htons(udph->source), htons(udph->dest)); + } +-EXPORT_SYMBOL(nfq_udp_snprintf); + + /** + * @} +diff --git a/src/internal.h b/src/internal.h +index 558d267..79b0752 100644 +--- a/src/internal.h ++++ b/src/internal.h +@@ -5,10 +5,9 @@ + #include <stdint.h> + #include <stdbool.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 + + struct iphdr; +diff --git a/src/libnetfilter_queue.c b/src/libnetfilter_queue.c +index 065d618..ab0b66b 100644 +--- a/src/libnetfilter_queue.c ++++ b/src/libnetfilter_queue.c +@@ -133,8 +133,7 @@ struct nfq_data { + struct nfattr **data; + }; + +-int nfq_errno; +-EXPORT_SYMBOL(nfq_errno); ++int __EXPORTED nfq_errno; + + /*********************************************************************** + * low level stuff +@@ -218,11 +217,10 @@ static int __nfq_rcv_pkt(struct nlmsghdr *nlh, struct nfattr *nfa[], + + /* public interface */ + +-struct nfnl_handle *nfq_nfnlh(struct nfq_handle *h) ++struct nfnl_handle __EXPORTED *nfq_nfnlh(struct nfq_handle *h) + { + return h->nfnlh; + } +-EXPORT_SYMBOL(nfq_nfnlh); + + /** + * +@@ -294,11 +292,10 @@ EXPORT_SYMBOL(nfq_nfnlh); + * over the netlink connection associated with the given queue connection + * handle. + */ +-int nfq_fd(struct nfq_handle *h) ++int __EXPORTED nfq_fd(struct nfq_handle *h) + { + return nfnl_fd(nfq_nfnlh(h)); + } +-EXPORT_SYMBOL(nfq_fd); + /** + * @} + */ +@@ -349,7 +346,7 @@ EXPORT_SYMBOL(nfq_fd); + * + * \return a pointer to a new queue handle or NULL on failure. + */ +-struct nfq_handle *nfq_open(void) ++struct nfq_handle __EXPORTED *nfq_open(void) + { + struct nfnl_handle *nfnlh = nfnl_open(); + struct nfq_handle *qh; +@@ -366,7 +363,6 @@ struct nfq_handle *nfq_open(void) + + return qh; + } +-EXPORT_SYMBOL(nfq_open); + + /** + * @} +@@ -382,7 +378,7 @@ EXPORT_SYMBOL(nfq_open); + * + * \return a pointer to a new queue handle or NULL on failure. + */ +-struct nfq_handle *nfq_open_nfnl(struct nfnl_handle *nfnlh) ++struct nfq_handle __EXPORTED *nfq_open_nfnl(struct nfnl_handle *nfnlh) + { + struct nfnl_callback pkt_cb = { + .call = __nfq_rcv_pkt, +@@ -419,7 +415,6 @@ out_free: + free(h); + return NULL; + } +-EXPORT_SYMBOL(nfq_open_nfnl); + + /** + * \addtogroup LibrarySetup +@@ -438,7 +433,7 @@ EXPORT_SYMBOL(nfq_open_nfnl); + * + * \return 0 on success, non-zero on failure. + */ +-int nfq_close(struct nfq_handle *h) ++int __EXPORTED nfq_close(struct nfq_handle *h) + { + int ret; + +@@ -447,7 +442,6 @@ int nfq_close(struct nfq_handle *h) + free(h); + return ret; + } +-EXPORT_SYMBOL(nfq_close); + + /** + * nfq_bind_pf - bind a nfqueue handler to a given protocol family +@@ -460,11 +454,10 @@ EXPORT_SYMBOL(nfq_close); + * + * \return integer inferior to 0 in case of failure + */ +-int nfq_bind_pf(struct nfq_handle *h, uint16_t pf) ++int __EXPORTED nfq_bind_pf(struct nfq_handle *h, uint16_t pf) + { + return __build_send_cfg_msg(h, NFQNL_CFG_CMD_PF_BIND, 0, pf); + } +-EXPORT_SYMBOL(nfq_bind_pf); + + /** + * nfq_unbind_pf - unbind nfqueue handler from a protocol family +@@ -476,11 +469,10 @@ EXPORT_SYMBOL(nfq_bind_pf); + * + * This call is obsolete, Linux kernels from 3.8 onwards ignore it. + */ +-int nfq_unbind_pf(struct nfq_handle *h, uint16_t pf) ++int __EXPORTED nfq_unbind_pf(struct nfq_handle *h, uint16_t pf) + { + return __build_send_cfg_msg(h, NFQNL_CFG_CMD_PF_UNBIND, 0, pf); + } +-EXPORT_SYMBOL(nfq_unbind_pf); + + + /** +@@ -524,7 +516,7 @@ typedef int nfq_callback(struct nfq_q_handle *qh, + * The callback should return < 0 to stop processing. + */ + +-struct nfq_q_handle *nfq_create_queue(struct nfq_handle *h, ++struct nfq_q_handle __EXPORTED *nfq_create_queue(struct nfq_handle *h, + uint16_t num, + nfq_callback *cb, + void *data) +@@ -555,7 +547,6 @@ struct nfq_q_handle *nfq_create_queue(struct nfq_handle *h, + add_qh(qh); + return qh; + } +-EXPORT_SYMBOL(nfq_create_queue); + + /** + * @} +@@ -573,7 +564,7 @@ EXPORT_SYMBOL(nfq_create_queue); + * Removes the binding for the specified queue handle. This call also unbind + * from the nfqueue handler, so you don't have to call nfq_unbind_pf. + */ +-int nfq_destroy_queue(struct nfq_q_handle *qh) ++int __EXPORTED nfq_destroy_queue(struct nfq_q_handle *qh) + { + int ret = __build_send_cfg_msg(qh->h, NFQNL_CFG_CMD_UNBIND, qh->id, 0); + if (ret == 0) { +@@ -583,7 +574,6 @@ int nfq_destroy_queue(struct nfq_q_handle *qh) + + return ret; + } +-EXPORT_SYMBOL(nfq_destroy_queue); + + /** + * nfq_handle_packet - handle a packet received from the nfqueue subsystem +@@ -597,11 +587,10 @@ EXPORT_SYMBOL(nfq_destroy_queue); + * + * \return 0 on success, non-zero on failure. + */ +-int nfq_handle_packet(struct nfq_handle *h, char *buf, int len) ++int __EXPORTED nfq_handle_packet(struct nfq_handle *h, char *buf, int len) + { + return nfnl_handle_packet(h->nfnlh, buf, len); + } +-EXPORT_SYMBOL(nfq_handle_packet); + + /** + * nfq_set_mode - set the amount of packet data that nfqueue copies to userspace +@@ -618,7 +607,7 @@ EXPORT_SYMBOL(nfq_handle_packet); + * + * \return -1 on error; >=0 otherwise. + */ +-int nfq_set_mode(struct nfq_q_handle *qh, ++int __EXPORTED nfq_set_mode(struct nfq_q_handle *qh, + uint8_t mode, uint32_t range) + { + union { +@@ -638,7 +627,6 @@ int nfq_set_mode(struct nfq_q_handle *qh, + + return nfnl_query(qh->h->nfnlh, &u.nmh); + } +-EXPORT_SYMBOL(nfq_set_mode); + + /** + * nfq_set_queue_flags - set flags (options) for the kernel queue +@@ -690,7 +678,7 @@ EXPORT_SYMBOL(nfq_set_mode); + * + * \return -1 on error with errno set appropriately; =0 otherwise. + */ +-int nfq_set_queue_flags(struct nfq_q_handle *qh, ++int __EXPORTED nfq_set_queue_flags(struct nfq_q_handle *qh, + uint32_t mask, uint32_t flags) + { + union { +@@ -711,7 +699,6 @@ int nfq_set_queue_flags(struct nfq_q_handle *qh, + + return nfnl_query(qh->h->nfnlh, &u.nmh); + } +-EXPORT_SYMBOL(nfq_set_queue_flags); + + /** + * nfq_set_queue_maxlen - Set kernel queue maximum length parameter +@@ -724,7 +711,7 @@ EXPORT_SYMBOL(nfq_set_queue_flags); + * + * \return -1 on error; >=0 otherwise. + */ +-int nfq_set_queue_maxlen(struct nfq_q_handle *qh, ++int __EXPORTED nfq_set_queue_maxlen(struct nfq_q_handle *qh, + uint32_t queuelen) + { + union { +@@ -742,7 +729,6 @@ int nfq_set_queue_maxlen(struct nfq_q_handle *qh, + + return nfnl_query(qh->h->nfnlh, &u.nmh); + } +-EXPORT_SYMBOL(nfq_set_queue_maxlen); + + /** + * @} +@@ -829,14 +815,13 @@ static int __set_verdict(struct nfq_q_handle *qh, uint32_t id, + * + * \return -1 on error; >= 0 otherwise. + */ +-int nfq_set_verdict(struct nfq_q_handle *qh, uint32_t id, ++int __EXPORTED nfq_set_verdict(struct nfq_q_handle *qh, uint32_t id, + uint32_t verdict, uint32_t data_len, + const unsigned char *buf) + { + return __set_verdict(qh, id, verdict, 0, 0, data_len, buf, + NFQNL_MSG_VERDICT); + } +-EXPORT_SYMBOL(nfq_set_verdict); + + /** + * nfq_set_verdict2 - like nfq_set_verdict, but you can set the mark. +@@ -847,14 +832,13 @@ EXPORT_SYMBOL(nfq_set_verdict); + * \param data_len number of bytes of data pointed to by #buf + * \param buf the buffer that contains the packet data + */ +-int nfq_set_verdict2(struct nfq_q_handle *qh, uint32_t id, ++int __EXPORTED nfq_set_verdict2(struct nfq_q_handle *qh, uint32_t id, + uint32_t verdict, uint32_t mark, + uint32_t data_len, const unsigned char *buf) + { + return __set_verdict(qh, id, verdict, htonl(mark), 1, data_len, + buf, NFQNL_MSG_VERDICT); + } +-EXPORT_SYMBOL(nfq_set_verdict2); + + /** + * nfq_set_verdict_batch - issue verdicts on several packets at once +@@ -868,13 +852,12 @@ EXPORT_SYMBOL(nfq_set_verdict2); + * batch support was added in Linux 3.1. + * These functions will fail silently on older kernels. + */ +-int nfq_set_verdict_batch(struct nfq_q_handle *qh, uint32_t id, ++int __EXPORTED nfq_set_verdict_batch(struct nfq_q_handle *qh, uint32_t id, + uint32_t verdict) + { + return __set_verdict(qh, id, verdict, 0, 0, 0, NULL, + NFQNL_MSG_VERDICT_BATCH); + } +-EXPORT_SYMBOL(nfq_set_verdict_batch); + + /** + * nfq_set_verdict_batch2 - like nfq_set_verdict_batch, but you can set a mark. +@@ -883,13 +866,12 @@ EXPORT_SYMBOL(nfq_set_verdict_batch); + * \param verdict verdict to return to netfilter (NF_ACCEPT, NF_DROP) + * \param mark mark to put on packet + */ +-int nfq_set_verdict_batch2(struct nfq_q_handle *qh, uint32_t id, ++int __EXPORTED nfq_set_verdict_batch2(struct nfq_q_handle *qh, uint32_t id, + uint32_t verdict, uint32_t mark) + { + return __set_verdict(qh, id, verdict, htonl(mark), 1, 0, + NULL, NFQNL_MSG_VERDICT_BATCH); + } +-EXPORT_SYMBOL(nfq_set_verdict_batch2); + + /** + * nfq_set_verdict_mark - like nfq_set_verdict, but you can set the mark. +@@ -905,14 +887,13 @@ EXPORT_SYMBOL(nfq_set_verdict_batch2); + * This function is deprecated since it is broken, its use is highly + * discouraged. Please, use nfq_set_verdict2 instead. + */ +-int nfq_set_verdict_mark(struct nfq_q_handle *qh, uint32_t id, ++int __EXPORTED nfq_set_verdict_mark(struct nfq_q_handle *qh, uint32_t id, + uint32_t verdict, uint32_t mark, + uint32_t data_len, const unsigned char *buf) + { + return __set_verdict(qh, id, verdict, mark, 1, data_len, buf, + NFQNL_MSG_VERDICT); + } +-EXPORT_SYMBOL(nfq_set_verdict_mark); + + /** + * @} +@@ -947,12 +928,11 @@ EXPORT_SYMBOL(nfq_set_verdict_mark); + } __attribute__ ((packed)); + \endverbatim + */ +-struct nfqnl_msg_packet_hdr *nfq_get_msg_packet_hdr(struct nfq_data *nfad) ++struct nfqnl_msg_packet_hdr __EXPORTED *nfq_get_msg_packet_hdr(struct nfq_data *nfad) + { + return nfnl_get_pointer_to_data(nfad->data, NFQA_PACKET_HDR, + struct nfqnl_msg_packet_hdr); + } +-EXPORT_SYMBOL(nfq_get_msg_packet_hdr); + + /** + * nfq_get_nfmark - get the packet mark +@@ -960,11 +940,10 @@ EXPORT_SYMBOL(nfq_get_msg_packet_hdr); + * + * \return the netfilter mark currently assigned to the given queued packet. + */ +-uint32_t nfq_get_nfmark(struct nfq_data *nfad) ++uint32_t __EXPORTED nfq_get_nfmark(struct nfq_data *nfad) + { + return ntohl(nfnl_get_data(nfad->data, NFQA_MARK, uint32_t)); + } +-EXPORT_SYMBOL(nfq_get_nfmark); + + /** + * nfq_get_timestamp - get the packet timestamp +@@ -975,7 +954,7 @@ EXPORT_SYMBOL(nfq_get_nfmark); + * + * \return 0 on success, non-zero on failure. + */ +-int nfq_get_timestamp(struct nfq_data *nfad, struct timeval *tv) ++int __EXPORTED nfq_get_timestamp(struct nfq_data *nfad, struct timeval *tv) + { + struct nfqnl_msg_packet_timestamp *qpt; + qpt = nfnl_get_pointer_to_data(nfad->data, NFQA_TIMESTAMP, +@@ -988,7 +967,6 @@ int nfq_get_timestamp(struct nfq_data *nfad, struct timeval *tv) + + return 0; + } +-EXPORT_SYMBOL(nfq_get_timestamp); + + /** + * nfq_get_indev - get the interface that the packet was received through +@@ -1001,11 +979,10 @@ EXPORT_SYMBOL(nfq_get_timestamp); + * \warning all nfq_get_dev() functions return 0 if not set, since linux + * only allows ifindex >= 1, see net/core/dev.c:2600 (in 2.6.13.1) + */ +-uint32_t nfq_get_indev(struct nfq_data *nfad) ++uint32_t __EXPORTED nfq_get_indev(struct nfq_data *nfad) + { + return ntohl(nfnl_get_data(nfad->data, NFQA_IFINDEX_INDEV, uint32_t)); + } +-EXPORT_SYMBOL(nfq_get_indev); + + /** + * nfq_get_physindev - get the physical interface that the packet was received +@@ -1015,11 +992,10 @@ EXPORT_SYMBOL(nfq_get_indev); + * If the returned index is 0, the packet was locally generated or the + * physical input interface is no longer known (ie. POSTROUTING?). + */ +-uint32_t nfq_get_physindev(struct nfq_data *nfad) ++uint32_t __EXPORTED nfq_get_physindev(struct nfq_data *nfad) + { + return ntohl(nfnl_get_data(nfad->data, NFQA_IFINDEX_PHYSINDEV, uint32_t)); + } +-EXPORT_SYMBOL(nfq_get_physindev); + + /** + * nfq_get_outdev - gets the interface that the packet will be routed out +@@ -1029,11 +1005,10 @@ EXPORT_SYMBOL(nfq_get_physindev); + * returned index is 0, the packet is destined for localhost or the output + * interface is not yet known (ie. PREROUTING?). + */ +-uint32_t nfq_get_outdev(struct nfq_data *nfad) ++uint32_t __EXPORTED nfq_get_outdev(struct nfq_data *nfad) + { + return ntohl(nfnl_get_data(nfad->data, NFQA_IFINDEX_OUTDEV, uint32_t)); + } +-EXPORT_SYMBOL(nfq_get_outdev); + + /** + * nfq_get_physoutdev - get the physical interface that the packet output +@@ -1045,11 +1020,10 @@ EXPORT_SYMBOL(nfq_get_outdev); + * + * \return The index of physical interface that the packet output will be routed out. + */ +-uint32_t nfq_get_physoutdev(struct nfq_data *nfad) ++uint32_t __EXPORTED nfq_get_physoutdev(struct nfq_data *nfad) + { + return ntohl(nfnl_get_data(nfad->data, NFQA_IFINDEX_PHYSOUTDEV, uint32_t)); + } +-EXPORT_SYMBOL(nfq_get_physoutdev); + + /** + * nfq_get_indev_name - get the name of the interface the packet +@@ -1089,13 +1063,12 @@ EXPORT_SYMBOL(nfq_get_physoutdev); + \endverbatim + * + */ +-int nfq_get_indev_name(struct nlif_handle *nlif_handle, ++int __EXPORTED nfq_get_indev_name(struct nlif_handle *nlif_handle, + struct nfq_data *nfad, char *name) + { + uint32_t ifindex = nfq_get_indev(nfad); + return nlif_index2name(nlif_handle, ifindex, name); + } +-EXPORT_SYMBOL(nfq_get_indev_name); + + /** + * nfq_get_physindev_name - get the name of the physical interface the +@@ -1109,13 +1082,12 @@ EXPORT_SYMBOL(nfq_get_indev_name); + * + * \return -1 in case of error, > 0 if it succeed. + */ +-int nfq_get_physindev_name(struct nlif_handle *nlif_handle, ++int __EXPORTED nfq_get_physindev_name(struct nlif_handle *nlif_handle, + struct nfq_data *nfad, char *name) + { + uint32_t ifindex = nfq_get_physindev(nfad); + return nlif_index2name(nlif_handle, ifindex, name); + } +-EXPORT_SYMBOL(nfq_get_physindev_name); + + /** + * nfq_get_outdev_name - get the name of the physical interface the +@@ -1129,13 +1101,12 @@ EXPORT_SYMBOL(nfq_get_physindev_name); + * + * \return -1 in case of error, > 0 if it succeed. + */ +-int nfq_get_outdev_name(struct nlif_handle *nlif_handle, ++int __EXPORTED nfq_get_outdev_name(struct nlif_handle *nlif_handle, + struct nfq_data *nfad, char *name) + { + uint32_t ifindex = nfq_get_outdev(nfad); + return nlif_index2name(nlif_handle, ifindex, name); + } +-EXPORT_SYMBOL(nfq_get_outdev_name); + + /** + * nfq_get_physoutdev_name - get the name of the interface the +@@ -1150,13 +1121,12 @@ EXPORT_SYMBOL(nfq_get_outdev_name); + * \return -1 in case of error, > 0 if it succeed. + */ + +-int nfq_get_physoutdev_name(struct nlif_handle *nlif_handle, ++int __EXPORTED nfq_get_physoutdev_name(struct nlif_handle *nlif_handle, + struct nfq_data *nfad, char *name) + { + uint32_t ifindex = nfq_get_physoutdev(nfad); + return nlif_index2name(nlif_handle, ifindex, name); + } +-EXPORT_SYMBOL(nfq_get_physoutdev_name); + + /** + * nfq_get_packet_hw +@@ -1180,12 +1150,11 @@ EXPORT_SYMBOL(nfq_get_physoutdev_name); + } __attribute__ ((packed)); + \endverbatim + */ +-struct nfqnl_msg_packet_hw *nfq_get_packet_hw(struct nfq_data *nfad) ++struct nfqnl_msg_packet_hw __EXPORTED *nfq_get_packet_hw(struct nfq_data *nfad) + { + return nfnl_get_pointer_to_data(nfad->data, NFQA_HWADDR, + struct nfqnl_msg_packet_hw); + } +-EXPORT_SYMBOL(nfq_get_packet_hw); + + /** + * nfq_get_uid - get the UID of the user the packet belongs to +@@ -1193,7 +1162,7 @@ EXPORT_SYMBOL(nfq_get_packet_hw); + * + * \return 1 if there is a UID available, 0 otherwise. + */ +-int nfq_get_uid(struct nfq_data *nfad, uint32_t *uid) ++int __EXPORTED nfq_get_uid(struct nfq_data *nfad, uint32_t *uid) + { + if (!nfnl_attr_present(nfad->data, NFQA_UID)) + return 0; +@@ -1201,7 +1170,6 @@ int nfq_get_uid(struct nfq_data *nfad, uint32_t *uid) + *uid = ntohl(nfnl_get_data(nfad->data, NFQA_UID, uint32_t)); + return 1; + } +-EXPORT_SYMBOL(nfq_get_uid); + + /** + * nfq_get_gid - get the GID of the user the packet belongs to +@@ -1209,7 +1177,7 @@ EXPORT_SYMBOL(nfq_get_uid); + * + * \return 1 if there is a GID available, 0 otherwise. + */ +-int nfq_get_gid(struct nfq_data *nfad, uint32_t *gid) ++int __EXPORTED nfq_get_gid(struct nfq_data *nfad, uint32_t *gid) + { + if (!nfnl_attr_present(nfad->data, NFQA_GID)) + return 0; +@@ -1217,7 +1185,6 @@ int nfq_get_gid(struct nfq_data *nfad, uint32_t *gid) + *gid = ntohl(nfnl_get_data(nfad->data, NFQA_GID, uint32_t)); + return 1; + } +-EXPORT_SYMBOL(nfq_get_gid); + + + /** +@@ -1227,7 +1194,7 @@ EXPORT_SYMBOL(nfq_get_gid); + * + * \return -1 on error, otherwise > 0 + */ +-int nfq_get_secctx(struct nfq_data *nfad, unsigned char **secdata) ++int __EXPORTED nfq_get_secctx(struct nfq_data *nfad, unsigned char **secdata) + { + if (!nfnl_attr_present(nfad->data, NFQA_SECCTX)) + return -1; +@@ -1240,7 +1207,6 @@ int nfq_get_secctx(struct nfq_data *nfad, unsigned char **secdata) + + return 0; + } +-EXPORT_SYMBOL(nfq_get_secctx); + + /** + * nfq_get_payload - get payload +@@ -1253,7 +1219,7 @@ EXPORT_SYMBOL(nfq_get_secctx); + * + * \return -1 on error, otherwise > 0. + */ +-int nfq_get_payload(struct nfq_data *nfad, unsigned char **data) ++int __EXPORTED nfq_get_payload(struct nfq_data *nfad, unsigned char **data) + { + *data = (unsigned char *) + nfnl_get_pointer_to_data(nfad->data, NFQA_PAYLOAD, char); +@@ -1262,7 +1228,6 @@ int nfq_get_payload(struct nfq_data *nfad, unsigned char **data) + + return -1; + } +-EXPORT_SYMBOL(nfq_get_payload); + + /** + * @} +@@ -1307,7 +1272,7 @@ do { \ + * would have been printed into the buffer (in case that there is enough + * room in it). See snprintf() return value for more information. + */ +-int nfq_snprintf_xml(char *buf, size_t rem, struct nfq_data *tb, int flags) ++int __EXPORTED nfq_snprintf_xml(char *buf, size_t rem, struct nfq_data *tb, int flags) + { + struct nfqnl_msg_packet_hdr *ph; + struct nfqnl_msg_packet_hw *hwph; +@@ -1460,7 +1425,6 @@ int nfq_snprintf_xml(char *buf, size_t rem, struct nfq_data *tb, int flags) + + return len; + } +-EXPORT_SYMBOL(nfq_snprintf_xml); + + /** + * @} +diff --git a/src/nlmsg.c b/src/nlmsg.c +index ba28c77..5582407 100644 +--- a/src/nlmsg.c ++++ b/src/nlmsg.c +@@ -30,7 +30,7 @@ + * @{ + */ + +-void nfq_nlmsg_verdict_put(struct nlmsghdr *nlh, int id, int verdict) ++void __EXPORTED nfq_nlmsg_verdict_put(struct nlmsghdr *nlh, int id, int verdict) + { + struct nfqnl_msg_verdict_hdr vh = { + .verdict = htonl(verdict), +@@ -38,20 +38,17 @@ void nfq_nlmsg_verdict_put(struct nlmsghdr *nlh, int id, int verdict) + }; + mnl_attr_put(nlh, NFQA_VERDICT_HDR, sizeof(vh), &vh); + } +-EXPORT_SYMBOL(nfq_nlmsg_verdict_put); + +-void nfq_nlmsg_verdict_put_mark(struct nlmsghdr *nlh, uint32_t mark) ++void __EXPORTED nfq_nlmsg_verdict_put_mark(struct nlmsghdr *nlh, uint32_t mark) + { + mnl_attr_put_u32(nlh, NFQA_MARK, htonl(mark)); + } +-EXPORT_SYMBOL(nfq_nlmsg_verdict_put_mark); + +-void ++void __EXPORTED + nfq_nlmsg_verdict_put_pkt(struct nlmsghdr *nlh, const void *pkt, uint32_t plen) + { + mnl_attr_put(nlh, NFQA_PAYLOAD, plen, pkt); + } +-EXPORT_SYMBOL(nfq_nlmsg_verdict_put_pkt); + + /** + * @} +@@ -85,7 +82,7 @@ EXPORT_SYMBOL(nfq_nlmsg_verdict_put_pkt); + * given protocol family. Both commands are ignored by Linux kernel 3.8 and + * later versions. + */ +-void nfq_nlmsg_cfg_put_cmd(struct nlmsghdr *nlh, uint16_t pf, uint8_t cmd) ++void __EXPORTED nfq_nlmsg_cfg_put_cmd(struct nlmsghdr *nlh, uint16_t pf, uint8_t cmd) + { + struct nfqnl_msg_config_cmd command = { + .command = cmd, +@@ -93,9 +90,8 @@ void nfq_nlmsg_cfg_put_cmd(struct nlmsghdr *nlh, uint16_t pf, uint8_t cmd) + }; + mnl_attr_put(nlh, NFQA_CFG_CMD, sizeof(command), &command); + } +-EXPORT_SYMBOL(nfq_nlmsg_cfg_put_cmd); + +-void nfq_nlmsg_cfg_put_params(struct nlmsghdr *nlh, uint8_t mode, int range) ++void __EXPORTED nfq_nlmsg_cfg_put_params(struct nlmsghdr *nlh, uint8_t mode, int range) + { + struct nfqnl_msg_config_params params = { + .copy_range = htonl(range), +@@ -103,13 +99,11 @@ void nfq_nlmsg_cfg_put_params(struct nlmsghdr *nlh, uint8_t mode, int range) + }; + mnl_attr_put(nlh, NFQA_CFG_PARAMS, sizeof(params), ¶ms); + } +-EXPORT_SYMBOL(nfq_nlmsg_cfg_put_params); + +-void nfq_nlmsg_cfg_put_qmaxlen(struct nlmsghdr *nlh, uint32_t queue_maxlen) ++void __EXPORTED nfq_nlmsg_cfg_put_qmaxlen(struct nlmsghdr *nlh, uint32_t queue_maxlen) + { + mnl_attr_put_u32(nlh, NFQA_CFG_QUEUE_MAXLEN, htonl(queue_maxlen)); + } +-EXPORT_SYMBOL(nfq_nlmsg_cfg_put_qmaxlen); + + /** + * @} +@@ -179,12 +173,11 @@ static int nfq_pkt_parse_attr_cb(const struct nlattr *attr, void *data) + * This function returns MNL_CB_ERROR if any error occurs, or MNL_CB_OK on + * success. + */ +-int nfq_nlmsg_parse(const struct nlmsghdr *nlh, struct nlattr **attr) ++int __EXPORTED nfq_nlmsg_parse(const struct nlmsghdr *nlh, struct nlattr **attr) + { + return mnl_attr_parse(nlh, sizeof(struct nfgenmsg), + nfq_pkt_parse_attr_cb, attr); + } +-EXPORT_SYMBOL(nfq_nlmsg_parse); + + /** + * @} +-- +2.12.2 +
meta-networking/recipes-filter/libnetfilter/libnetfilter-queue_1.0.2.bb +1 -0
@@ -11,6 +11,7 @@ SRCREV = "981025e103d887fb6a9c9bb49c74ec323108d098" SRC_URI = "git://git.netfilter.org/libnetfilter_queue \ file://0001-Correct-typo-in-the-location-of-internal.h-in-includ.patch \ + file://0001-libnetfilter-queue-Declare-the-define-visivility-attribute-together.patch \ " S = "${WORKDIR}/git"
Signature · 1 line
2.12.2
PATCH 8/32 libnetfilter-cthelper, libnetfilter-cttimeout: Backport patches to fix symbol visibility
In reply to Khem RajThese are needed for building it with clang
--- .../libnetfilter-cthelper-visibility-hidden.patch | 385 +++++++++++++++++++++ .../libnetfilter-cttimeout-visibility-hidden.patch | 264 ++++++++++++++ .../libnetfilter/libnetfilter-cthelper_1.0.0.bb | 4 +- .../libnetfilter/libnetfilter-cttimeout_1.0.0.bb | 4 +- 4 files changed, 655 insertions(+), 2 deletions(-) create mode 100644 meta-networking/recipes-filter/libnetfilter/files/libnetfilter-cthelper-visibility-hidden.patch create mode 100644 meta-networking/recipes-filter/libnetfilter/files/libnetfilter-cttimeout-visibility-hidden.patch
meta-networking/recipes-filter/libnetfilter/files/libnetfilter-cthelper-visibility-hidden.patch new file +385 -0
@@ -0,0 +1,385 @@ +From f58c5b09fb59baf07c942d373fc4d522b27e73c6 Mon Sep 17 00:00:00 2001 +From: Kevin Cernekee <[email protected]> +Date: Wed, 4 Jan 2017 14:30:26 -0800 +Subject: Use __EXPORTED rather than EXPORT_SYMBOL + +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_helper_* are not exported to library +callers. + +Move the attribute up into the function definition to make clang happy. + +Signed-off-by: Kevin Cernekee <[email protected]> +Signed-off-by: Pablo Neira Ayuso <[email protected]> +--- + doxygen.cfg.in | 2 +- + src/internal.h | 5 ++- + src/libnetfilter_cthelper.c | 83 ++++++++++++++++++--------------------------- + 3 files changed, 36 insertions(+), 54 deletions(-) + +diff --git a/doxygen.cfg.in b/doxygen.cfg.in +index cac9b05..190b7cd 100644 +--- a/doxygen.cfg.in ++++ b/doxygen.cfg.in +@@ -72,7 +72,7 @@ RECURSIVE = YES + EXCLUDE = + EXCLUDE_SYMLINKS = NO + EXCLUDE_PATTERNS = */.git/* .*.d +-EXCLUDE_SYMBOLS = EXPORT_SYMBOL ++EXCLUDE_SYMBOLS = + EXAMPLE_PATH = + EXAMPLE_PATTERNS = + EXAMPLE_RECURSIVE = NO +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 +diff --git a/src/libnetfilter_cthelper.c b/src/libnetfilter_cthelper.c +index f8f58e6..af543a1 100644 +--- a/src/libnetfilter_cthelper.c ++++ b/src/libnetfilter_cthelper.c +@@ -99,17 +99,16 @@ struct nfct_helper { + * In case of success, this function returns a valid pointer, otherwise NULL + * s returned and errno is appropriately set. + */ +-struct nfct_helper *nfct_helper_alloc(void) ++struct nfct_helper __EXPORTED *nfct_helper_alloc(void) + { + return calloc(1, sizeof(struct nfct_helper)); + } +-EXPORT_SYMBOL(nfct_helper_alloc); + + /** + * nfct_helper_free - release one helper object + * \param nfct_helper pointer to the helper object + */ +-void nfct_helper_free(struct nfct_helper *h) ++void __EXPORTED nfct_helper_free(struct nfct_helper *h) + { + int i; + +@@ -119,7 +118,6 @@ void nfct_helper_free(struct nfct_helper *h) + } + free(h); + } +-EXPORT_SYMBOL(nfct_helper_free); + + /** + * nfct_helper_policy_alloc - allocate a new helper policy object +@@ -127,21 +125,19 @@ EXPORT_SYMBOL(nfct_helper_free); + * In case of success, this function returns a valid pointer, otherwise NULL + * s returned and errno is appropriately set. + */ +-struct nfct_helper_policy *nfct_helper_policy_alloc(void) ++struct nfct_helper_policy __EXPORTED *nfct_helper_policy_alloc(void) + { + return calloc(1, sizeof(struct nfct_helper_policy)); + } +-EXPORT_SYMBOL(nfct_helper_policy_alloc); + + /** + * nfct_helper_free - release one helper policy object + * \param nfct_helper pointer to the helper object + */ +-void nfct_helper_policy_free(struct nfct_helper_policy *p) ++void __EXPORTED nfct_helper_policy_free(struct nfct_helper_policy *p) + { + free(p); + } +-EXPORT_SYMBOL(nfct_helper_policy_free); + + /** + * nfct_helper_policy_attr_set - set one attribute of the helper object +@@ -149,7 +145,7 @@ EXPORT_SYMBOL(nfct_helper_policy_free); + * \param type attribute type you want to set + * \param data pointer to data that will be used to set this attribute + */ +-void ++void __EXPORTED + nfct_helper_policy_attr_set(struct nfct_helper_policy *p, + enum nfct_helper_policy_attr_type type, + const void *data) +@@ -170,7 +166,6 @@ nfct_helper_policy_attr_set(struct nfct_helper_policy *p, + break; + } + } +-EXPORT_SYMBOL(nfct_helper_policy_attr_set); + + /** + * nfct_helper_attr_set_str - set one attribute the helper object +@@ -178,23 +173,21 @@ EXPORT_SYMBOL(nfct_helper_policy_attr_set); + * \param type attribute type you want to set + * \param name string that will be used to set this attribute + */ +-void ++void __EXPORTED + nfct_helper_policy_attr_set_str(struct nfct_helper_policy *p, + enum nfct_helper_policy_attr_type type, + const char *name) + { + nfct_helper_policy_attr_set(p, type, name); + } +-EXPORT_SYMBOL(nfct_helper_policy_attr_set_str); + +-void ++void __EXPORTED + nfct_helper_policy_attr_set_u32(struct nfct_helper_policy *p, + enum nfct_helper_policy_attr_type type, + uint32_t value) + { + nfct_helper_policy_attr_set(p, type, &value); + } +-EXPORT_SYMBOL(nfct_helper_policy_attr_set_u32); + + /** + * nfct_helper_attr_set - set one attribute of the helper object +@@ -202,7 +195,7 @@ EXPORT_SYMBOL(nfct_helper_policy_attr_set_u32); + * \param type attribute type you want to set + * \param data pointer to data that will be used to set this attribute + */ +-void ++void __EXPORTED + nfct_helper_attr_set(struct nfct_helper *h, + enum nfct_helper_attr_type type, const void *data) + { +@@ -250,7 +243,6 @@ nfct_helper_attr_set(struct nfct_helper *h, + break; + } + } +-EXPORT_SYMBOL(nfct_helper_attr_set); + + /** + * nfct_helper_attr_set_str - set one attribute the helper object +@@ -258,44 +250,40 @@ EXPORT_SYMBOL(nfct_helper_attr_set); + * \param type attribute type you want to set + * \param name string that will be used to set this attribute + */ +-void ++void __EXPORTED + nfct_helper_attr_set_str(struct nfct_helper *nfct_helper, enum nfct_helper_attr_type type, + const char *name) + { + nfct_helper_attr_set(nfct_helper, type, name); + } +-EXPORT_SYMBOL(nfct_helper_attr_set_str); + +-void ++void __EXPORTED + nfct_helper_attr_set_u8(struct nfct_helper *nfct_helper, + enum nfct_helper_attr_type type, uint8_t value) + { + nfct_helper_attr_set(nfct_helper, type, &value); + } +-EXPORT_SYMBOL(nfct_helper_attr_set_u8); + +-void ++void __EXPORTED + nfct_helper_attr_set_u16(struct nfct_helper *nfct_helper, + enum nfct_helper_attr_type type, uint16_t value) + { + nfct_helper_attr_set(nfct_helper, type, &value); + } +-EXPORT_SYMBOL(nfct_helper_attr_set_u16); + +-void ++void __EXPORTED + nfct_helper_attr_set_u32(struct nfct_helper *nfct_helper, + enum nfct_helper_attr_type type, uint32_t value) + { + nfct_helper_attr_set(nfct_helper, type, &value); + } +-EXPORT_SYMBOL(nfct_helper_attr_set_u32); + + /** + * nfct_helper_attr_unset - unset one attribute the helper object + * \param nfct_helper pointer to the helper object + * \param type attribute type you want to set + */ +-void ++void __EXPORTED + nfct_helper_attr_unset(struct nfct_helper *nfct_helper, enum nfct_helper_attr_type type) + { + switch(type) { +@@ -307,7 +295,6 @@ nfct_helper_attr_unset(struct nfct_helper *nfct_helper, enum nfct_helper_attr_ty + break; + } + } +-EXPORT_SYMBOL(nfct_helper_attr_unset); + + /** + * nfct_helper_attr_get - get one attribute the helper object +@@ -317,8 +304,9 @@ EXPORT_SYMBOL(nfct_helper_attr_unset); + * This function returns a valid pointer to the attribute data. If a + * unsupported attribute is used, this returns NULL. + */ +-const void *nfct_helper_attr_get(struct nfct_helper *helper, +- enum nfct_helper_attr_type type) ++const void __EXPORTED * ++nfct_helper_attr_get(struct nfct_helper *helper, ++ enum nfct_helper_attr_type type) + { + const void *ret = NULL; + +@@ -358,7 +346,6 @@ const void *nfct_helper_attr_get(struct nfct_helper *helper, + } + return ret; + } +-EXPORT_SYMBOL(nfct_helper_attr_get); + + /** + * nfct_helper_attr_get_str - get one attribute the helper object +@@ -368,13 +355,12 @@ EXPORT_SYMBOL(nfct_helper_attr_get); + * This function returns a valid pointer to the beginning of the string. + * If the attribute is unsupported, this returns NULL. + */ +-const char * ++const char __EXPORTED * + nfct_helper_attr_get_str(struct nfct_helper *nfct_helper, + enum nfct_helper_attr_type type) + { + return (const char *)nfct_helper_attr_get(nfct_helper, type); + } +-EXPORT_SYMBOL(nfct_helper_attr_get_str); + + /** + * nfct_helper_attr_get_u8 - get one attribute the helper object +@@ -384,12 +370,12 @@ EXPORT_SYMBOL(nfct_helper_attr_get_str); + * This function returns a unsigned 8-bits integer. If the attribute is + * unsupported, this returns NULL. + */ +-uint8_t nfct_helper_attr_get_u8(struct nfct_helper *nfct_helper, +- enum nfct_helper_attr_type type) ++uint8_t __EXPORTED ++nfct_helper_attr_get_u8(struct nfct_helper *nfct_helper, ++ enum nfct_helper_attr_type type) + { + return *((uint8_t *)nfct_helper_attr_get(nfct_helper, type)); + } +-EXPORT_SYMBOL(nfct_helper_attr_get_u8); + + /** + * nfct_helper_attr_get_u16 - get one attribute the helper object +@@ -399,12 +385,12 @@ EXPORT_SYMBOL(nfct_helper_attr_get_u8); + * This function returns a unsigned 16-bits integer. If the attribute is + * unsupported, this returns NULL. + */ +-uint16_t nfct_helper_attr_get_u16(struct nfct_helper *nfct_helper, +- enum nfct_helper_attr_type type) ++uint16_t __EXPORTED ++nfct_helper_attr_get_u16(struct nfct_helper *nfct_helper, ++ enum nfct_helper_attr_type type) + { + return *((uint16_t *)nfct_helper_attr_get(nfct_helper, type)); + } +-EXPORT_SYMBOL(nfct_helper_attr_get_u16); + + /** + * nfct_helper_attr_get_u32 - get one attribute the helper object +@@ -414,12 +400,12 @@ EXPORT_SYMBOL(nfct_helper_attr_get_u16); + * This function returns a unsigned 32-bits integer. If the attribute is + * unsupported, this returns NULL. + */ +-uint32_t nfct_helper_attr_get_u32(struct nfct_helper *nfct_helper, +- enum nfct_helper_attr_type type) ++uint32_t __EXPORTED ++nfct_helper_attr_get_u32(struct nfct_helper *nfct_helper, ++ enum nfct_helper_attr_type type) + { + return *((uint32_t *)nfct_helper_attr_get(nfct_helper, type)); + } +-EXPORT_SYMBOL(nfct_helper_attr_get_u32); + + /** + * nfct_helper_snprintf - print helper object into one buffer +@@ -431,9 +417,10 @@ EXPORT_SYMBOL(nfct_helper_attr_get_u32); + * This function returns -1 in case that some mandatory attributes are + * missing. On sucess, it returns 0. + */ +-int nfct_helper_snprintf(char *buf, size_t size, +- struct nfct_helper *helper, +- unsigned int type, unsigned int flags) ++int __EXPORTED ++nfct_helper_snprintf(char *buf, size_t size, ++ struct nfct_helper *helper, ++ unsigned int type, unsigned int flags) + { + int ret; + +@@ -454,7 +441,6 @@ int nfct_helper_snprintf(char *buf, size_t size, + + return ret; + } +-EXPORT_SYMBOL(nfct_helper_snprintf); + + /** + * @} +@@ -490,7 +476,7 @@ EXPORT_SYMBOL(nfct_helper_snprintf); + * - Command NFNL_MSG_ACCT_DEL, to delete one specific nfct_helper object (if + * unused, otherwise you hit EBUSY). + */ +-struct nlmsghdr * ++struct nlmsghdr __EXPORTED * + nfct_helper_nlmsg_build_hdr(char *buf, uint8_t cmd, + uint16_t flags, uint32_t seq) + { +@@ -509,7 +495,6 @@ nfct_helper_nlmsg_build_hdr(char *buf, uint8_t cmd, + + return nlh; + } +-EXPORT_SYMBOL(nfct_helper_nlmsg_build_hdr); + + static void + nfct_helper_nlmsg_build_policy(struct nlmsghdr *nlh, +@@ -530,7 +515,7 @@ nfct_helper_nlmsg_build_policy(struct nlmsghdr *nlh, + * \param nlh: netlink message that you want to use to add the payload. + * \param nfct_helper: pointer to a helper object + */ +-void ++void __EXPORTED + nfct_helper_nlmsg_build_payload(struct nlmsghdr *nlh, struct nfct_helper *h) + { + struct nlattr *nest; +@@ -593,7 +578,6 @@ nfct_helper_nlmsg_build_payload(struct nlmsghdr *nlh, struct nfct_helper *h) + if (h->bitset & (1 << NFCTH_ATTR_STATUS)) + mnl_attr_put_u32(nlh, NFCTH_STATUS, ntohl(h->status)); + } +-EXPORT_SYMBOL(nfct_helper_nlmsg_build_payload); + + static int + nfct_helper_nlmsg_parse_tuple_cb(const struct nlattr *attr, void *data) +@@ -795,7 +779,7 @@ nfct_helper_nlmsg_parse_attr_cb(const struct nlattr *attr, void *data) + * This function returns -1 in case that some mandatory attributes are + * missing. On sucess, it returns 0. + */ +-int ++int __EXPORTED + nfct_helper_nlmsg_parse_payload(const struct nlmsghdr *nlh, + struct nfct_helper *h) + { +@@ -832,7 +816,6 @@ nfct_helper_nlmsg_parse_payload(const struct nlmsghdr *nlh, + } + return 0; + } +-EXPORT_SYMBOL(nfct_helper_nlmsg_parse_payload); + + /** + * @} +-- +cgit v1.1 +
meta-networking/recipes-filter/libnetfilter/files/libnetfilter-cttimeout-visibility-hidden.patch new file +264 -0
264 lines not on this page · raw message
meta-networking/recipes-filter/libnetfilter/libnetfilter-cthelper_1.0.0.bb +3 -1
@@ -6,7 +6,9 @@ LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b" DEPENDS = "libmnl" -SRC_URI = "http://www.netfilter.org/projects/libnetfilter_cthelper/files/libnetfilter_cthelper-${PV}.tar.bz2;name=tar" +SRC_URI = "http://www.netfilter.org/projects/libnetfilter_cthelper/files/libnetfilter_cthelper-${PV}.tar.bz2;name=tar \ + file://libnetfilter-cthelper-visibility-hidden.patch \ +" SRC_URI[tar.md5sum] = "b2efab1a3a198a5add448960ba011acd" SRC_URI[tar.sha256sum] = "07618e71c4d9a6b6b3dc1986540486ee310a9838ba754926c7d14a17d8fccf3d"
meta-networking/recipes-filter/libnetfilter/libnetfilter-cttimeout_1.0.0.bb +3 -1
@@ -5,7 +5,9 @@ LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b" DEPENDS = "libmnl" -SRC_URI = "http://www.netfilter.org/projects/libnetfilter_cttimeout/files/libnetfilter_cttimeout-${PV}.tar.bz2;name=tar" +SRC_URI = "http://www.netfilter.org/projects/libnetfilter_cttimeout/files/libnetfilter_cttimeout-${PV}.tar.bz2;name=tar \ + file://libnetfilter-cttimeout-visibility-hidden.patch \ +" SRC_URI[tar.md5sum] = "7697437fc9ebb6f6b83df56a633db7f9" SRC_URI[tar.sha256sum] = "aeab12754f557cba3ce2950a2029963d817490df7edb49880008b34d7ff8feba"
Signature · 1 line
2.12.2
PATCH 9/32 libnftnl: Upgrade to 1.0.7
In reply to Khem RajFix build with clang while here
--- ...-the-define-visivility-attribute-together.patch | 2949 ++++++++++++++++++++ ...ng-local-function-as-one-of-printf-family.patch | 514 ++++ .../libnftnl/libnftnl/snprintf_shadow.patch | 224 ++ .../recipes-filter/libnftnl/libnftnl_1.0.6.bb | 13 - .../recipes-filter/libnftnl/libnftnl_1.0.7.bb | 17 + 5 files changed, 3704 insertions(+), 13 deletions(-) create mode 100644 meta-networking/recipes-filter/libnftnl/libnftnl/0001-Declare-the-define-visivility-attribute-together.patch create mode 100644 meta-networking/recipes-filter/libnftnl/libnftnl/0001-avoid-naming-local-function-as-one-of-printf-family.patch create mode 100644 meta-networking/recipes-filter/libnftnl/libnftnl/snprintf_shadow.patch delete mode 100644 meta-networking/recipes-filter/libnftnl/libnftnl_1.0.6.bb create mode 100644 meta-networking/recipes-filter/libnftnl/libnftnl_1.0.7.bb
meta-networking/recipes-filter/libnftnl/libnftnl/0001-Declare-the-define-visivility-attribute-together.patch new file +2949 -0
@@ -0,0 +1,2949 @@ +From bd01f785da5222d0662be3182fe2650e1c12f43e Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Mon, 10 Apr 2017 14:07:07 -0700 +Subject: [PATCH] Declare the define visivility 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 + +Signed-off-by: Khem Raj <[email protected]> +--- + doxygen.cfg.in | 2 +- + include/utils.h | 5 +-- + src/batch.c | 21 ++++------- + src/chain.c | 102 +++++++++++++++++--------------------------------- + src/common.c | 21 ++++------- + src/expr.c | 51 +++++++++---------------- + src/gen.c | 39 +++++++------------ + src/object.c | 99 ++++++++++++++++-------------------------------- + src/rule.c | 114 +++++++++++++++++++------------------------------------- + src/ruleset.c | 48 ++++++++---------------- + src/set.c | 96 ++++++++++++++++------------------------------- + src/set_elem.c | 72 ++++++++++++----------------------- + src/table.c | 90 +++++++++++++++----------------------------- + src/trace.c | 27 +++++--------- + src/udata.c | 48 ++++++++---------------- + 15 files changed, 279 insertions(+), 556 deletions(-) + +diff --git a/doxygen.cfg.in b/doxygen.cfg.in +index 23fcad4..e49f28d 100644 +--- a/doxygen.cfg.in ++++ b/doxygen.cfg.in +@@ -72,7 +72,7 @@ RECURSIVE = YES + EXCLUDE = + EXCLUDE_SYMLINKS = NO + EXCLUDE_PATTERNS = */.git/* .*.d +-EXCLUDE_SYMBOLS = EXPORT_SYMBOL ++EXCLUDE_SYMBOLS = + EXAMPLE_PATH = + EXAMPLE_PATTERNS = + EXAMPLE_RECURSIVE = NO +diff --git a/include/utils.h b/include/utils.h +index 2f5cf34..ff8207e 100644 +--- a/include/utils.h ++++ b/include/utils.h +@@ -9,10 +9,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 __EXPORT + #endif + + #define __noreturn __attribute__((__noreturn__)) +diff --git a/src/batch.c b/src/batch.c +index 5ee3fd7..3bedd26 100644 +--- a/src/batch.c ++++ b/src/batch.c +@@ -57,7 +57,7 @@ static void nftnl_batch_add_page(struct nftnl_batch_page *page, + list_add_tail(&page->head, &batch->page_list); + } + +-struct nftnl_batch *nftnl_batch_alloc(uint32_t pg_size, uint32_t pg_overrun_size) ++struct nftnl_batch __EXPORTED *nftnl_batch_alloc(uint32_t pg_size, uint32_t pg_overrun_size) + { + struct nftnl_batch *batch; + struct nftnl_batch_page *page; +@@ -80,9 +80,8 @@ err1: + free(batch); + return NULL; + } +-EXPORT_SYMBOL(nftnl_batch_alloc); + +-void nftnl_batch_free(struct nftnl_batch *batch) ++void __EXPORTED nftnl_batch_free(struct nftnl_batch *batch) + { + struct nftnl_batch_page *page, *next; + +@@ -94,9 +93,8 @@ void nftnl_batch_free(struct nftnl_batch *batch) + + free(batch); + } +-EXPORT_SYMBOL(nftnl_batch_free); + +-int nftnl_batch_update(struct nftnl_batch *batch) ++int __EXPORTED nftnl_batch_update(struct nftnl_batch *batch) + { + struct nftnl_batch_page *page; + struct nlmsghdr *last_nlh; +@@ -119,21 +117,18 @@ int nftnl_batch_update(struct nftnl_batch *batch) + err1: + return -1; + } +-EXPORT_SYMBOL(nftnl_batch_update); + +-void *nftnl_batch_buffer(struct nftnl_batch *batch) ++void __EXPORTED *nftnl_batch_buffer(struct nftnl_batch *batch) + { + return mnl_nlmsg_batch_current(batch->current_page->batch); + } +-EXPORT_SYMBOL(nftnl_batch_buffer); + +-uint32_t nftnl_batch_buffer_len(struct nftnl_batch *batch) ++uint32_t __EXPORTED nftnl_batch_buffer_len(struct nftnl_batch *batch) + { + return mnl_nlmsg_batch_size(batch->current_page->batch); + } +-EXPORT_SYMBOL(nftnl_batch_buffer_len); + +-int nftnl_batch_iovec_len(struct nftnl_batch *batch) ++int __EXPORTED nftnl_batch_iovec_len(struct nftnl_batch *batch) + { + int num_pages = batch->num_pages; + +@@ -143,9 +138,8 @@ int nftnl_batch_iovec_len(struct nftnl_batch *batch) + + return num_pages; + } +-EXPORT_SYMBOL(nftnl_batch_iovec_len); + +-void nftnl_batch_iovec(struct nftnl_batch *batch, struct iovec *iov, ++void __EXPORTED nftnl_batch_iovec(struct nftnl_batch *batch, struct iovec *iov, + uint32_t iovlen) + { + struct nftnl_batch_page *page; +@@ -160,4 +154,3 @@ void nftnl_batch_iovec(struct nftnl_batch *batch, struct iovec *iov, + i++; + } + } +-EXPORT_SYMBOL(nftnl_batch_iovec); +diff --git a/src/chain.c b/src/chain.c +index 29860c5..362fa0d 100644 +--- a/src/chain.c ++++ b/src/chain.c +@@ -87,13 +87,12 @@ static const char *nftnl_hooknum2str(int family, int hooknum) + return "unknown"; + } + +-struct nftnl_chain *nftnl_chain_alloc(void) ++struct nftnl_chain __EXPORTED *nftnl_chain_alloc(void) + { + return calloc(1, sizeof(struct nftnl_chain)); + } +-EXPORT_SYMBOL(nftnl_chain_alloc); + +-void nftnl_chain_free(const struct nftnl_chain *c) ++void __EXPORTED nftnl_chain_free(const struct nftnl_chain *c) + { + if (c->flags & (1 << NFTNL_CHAIN_NAME)) + xfree(c->name); +@@ -105,15 +104,13 @@ void nftnl_chain_free(const struct nftnl_chain *c) + xfree(c->dev); + xfree(c); + } +-EXPORT_SYMBOL(nftnl_chain_free); + +-bool nftnl_chain_is_set(const struct nftnl_chain *c, uint16_t attr) ++bool __EXPORTED nftnl_chain_is_set(const struct nftnl_chain *c, uint16_t attr) + { + return c->flags & (1 << attr); + } +-EXPORT_SYMBOL(nftnl_chain_is_set); + +-void nftnl_chain_unset(struct nftnl_chain *c, uint16_t attr) ++void __EXPORTED nftnl_chain_unset(struct nftnl_chain *c, uint16_t attr) + { + if (!(c->flags & (1 << attr))) + return; +@@ -147,7 +144,6 @@ void nftnl_chain_unset(struct nftnl_chain *c, uint16_t attr) + + c->flags &= ~(1 << attr); + } +-EXPORT_SYMBOL(nftnl_chain_unset); + + static uint32_t nftnl_chain_validate[NFTNL_CHAIN_MAX + 1] = { + [NFTNL_CHAIN_HOOKNUM] = sizeof(uint32_t), +@@ -159,7 +155,7 @@ static uint32_t nftnl_chain_validate[NFTNL_CHAIN_MAX + 1] = { + [NFTNL_CHAIN_FAMILY] = sizeof(uint32_t), + }; + +-int nftnl_chain_set_data(struct nftnl_chain *c, uint16_t attr, ++int __EXPORTED nftnl_chain_set_data(struct nftnl_chain *c, uint16_t attr, + const void *data, uint32_t data_len) + { + nftnl_assert_attr_exists(attr, NFTNL_CHAIN_MAX); +@@ -226,45 +222,38 @@ int nftnl_chain_set_data(struct nftnl_chain *c, uint16_t attr, + c->flags |= (1 << attr); + return 0; + } +-EXPORT_SYMBOL(nftnl_chain_set_data); + +-void nftnl_chain_set(struct nftnl_chain *c, uint16_t attr, const void *data) ++void __EXPORTED nftnl_chain_set(struct nftnl_chain *c, uint16_t attr, const void *data) + { + nftnl_chain_set_data(c, attr, data, nftnl_chain_validate[attr]); + } +-EXPORT_SYMBOL(nftnl_chain_set); + +-void nftnl_chain_set_u32(struct nftnl_chain *c, uint16_t attr, uint32_t data) ++void __EXPORTED nftnl_chain_set_u32(struct nftnl_chain *c, uint16_t attr, uint32_t data) + { + nftnl_chain_set_data(c, attr, &data, sizeof(uint32_t)); + } +-EXPORT_SYMBOL(nftnl_chain_set_u32); + +-void nftnl_chain_set_s32(struct nftnl_chain *c, uint16_t attr, int32_t data) ++void __EXPORTED nftnl_chain_set_s32(struct nftnl_chain *c, uint16_t attr, int32_t data) + { + nftnl_chain_set_data(c, attr, &data, sizeof(int32_t)); + } +-EXPORT_SYMBOL(nftnl_chain_set_s32); + +-void nftnl_chain_set_u64(struct nftnl_chain *c, uint16_t attr, uint64_t data) ++void __EXPORTED nftnl_chain_set_u64(struct nftnl_chain *c, uint16_t attr, uint64_t data) + { + nftnl_chain_set_data(c, attr, &data, sizeof(uint64_t)); + } +-EXPORT_SYMBOL(nftnl_chain_set_u64); + +-void nftnl_chain_set_u8(struct nftnl_chain *c, uint16_t attr, uint8_t data) ++void __EXPORTED nftnl_chain_set_u8(struct nftnl_chain *c, uint16_t attr, uint8_t data) + { + nftnl_chain_set_data(c, attr, &data, sizeof(uint8_t)); + } +-EXPORT_SYMBOL(nftnl_chain_set_u8); + +-int nftnl_chain_set_str(struct nftnl_chain *c, uint16_t attr, const char *str) ++int __EXPORTED nftnl_chain_set_str(struct nftnl_chain *c, uint16_t attr, const char *str) + { + return nftnl_chain_set_data(c, attr, str, strlen(str) + 1); + } +-EXPORT_SYMBOL(nftnl_chain_set_str); + +-const void *nftnl_chain_get_data(const struct nftnl_chain *c, uint16_t attr, ++const void __EXPORTED *nftnl_chain_get_data(const struct nftnl_chain *c, uint16_t attr, + uint32_t *data_len) + { + if (!(c->flags & (1 << attr))) +@@ -310,22 +299,19 @@ const void *nftnl_chain_get_data(const struct nftnl_chain *c, uint16_t attr, + } + return NULL; + } +-EXPORT_SYMBOL(nftnl_chain_get_data); + +-const void *nftnl_chain_get(const struct nftnl_chain *c, uint16_t attr) ++const void __EXPORTED *nftnl_chain_get(const struct nftnl_chain *c, uint16_t attr) + { + uint32_t data_len; + return nftnl_chain_get_data(c, attr, &data_len); + } +-EXPORT_SYMBOL(nftnl_chain_get); + +-const char *nftnl_chain_get_str(const struct nftnl_chain *c, uint16_t attr) ++const char __EXPORTED *nftnl_chain_get_str(const struct nftnl_chain *c, uint16_t attr) + { + return nftnl_chain_get(c, attr); + } +-EXPORT_SYMBOL(nftnl_chain_get_str); + +-uint32_t nftnl_chain_get_u32(const struct nftnl_chain *c, uint16_t attr) ++uint32_t __EXPORTED nftnl_chain_get_u32(const struct nftnl_chain *c, uint16_t attr) + { + uint32_t data_len; + const uint32_t *val = nftnl_chain_get_data(c, attr, &data_len); +@@ -334,9 +320,8 @@ uint32_t nftnl_chain_get_u32(const struct nftnl_chain *c, uint16_t attr) + + return val ? *val : 0; + } +-EXPORT_SYMBOL(nftnl_chain_get_u32); + +-int32_t nftnl_chain_get_s32(const struct nftnl_chain *c, uint16_t attr) ++int32_t __EXPORTED nftnl_chain_get_s32(const struct nftnl_chain *c, uint16_t attr) + { + uint32_t data_len; + const int32_t *val = nftnl_chain_get_data(c, attr, &data_len); +@@ -345,9 +330,8 @@ int32_t nftnl_chain_get_s32(const struct nftnl_chain *c, uint16_t attr) + + return val ? *val : 0; + } +-EXPORT_SYMBOL(nftnl_chain_get_s32); + +-uint64_t nftnl_chain_get_u64(const struct nftnl_chain *c, uint16_t attr) ++uint64_t __EXPORTED nftnl_chain_get_u64(const struct nftnl_chain *c, uint16_t attr) + { + uint32_t data_len; + const uint64_t *val = nftnl_chain_get_data(c, attr, &data_len); +@@ -356,9 +340,8 @@ uint64_t nftnl_chain_get_u64(const struct nftnl_chain *c, uint16_t attr) + + return val ? *val : 0; + } +-EXPORT_SYMBOL(nftnl_chain_get_u64); + +-uint8_t nftnl_chain_get_u8(const struct nftnl_chain *c, uint16_t attr) ++uint8_t __EXPORTED nftnl_chain_get_u8(const struct nftnl_chain *c, uint16_t attr) + { + uint32_t data_len; + const uint8_t *val = nftnl_chain_get_data(c, attr, &data_len); +@@ -367,9 +350,8 @@ uint8_t nftnl_chain_get_u8(const struct nftnl_chain *c, uint16_t attr) + + return val ? *val : 0; + } +-EXPORT_SYMBOL(nftnl_chain_get_u8); + +-void nftnl_chain_nlmsg_build_payload(struct nlmsghdr *nlh, const struct nftnl_chain *c) ++void __EXPORTED nftnl_chain_nlmsg_build_payload(struct nlmsghdr *nlh, const struct nftnl_chain *c) + { + if (c->flags & (1 << NFTNL_CHAIN_TABLE)) + mnl_attr_put_strz(nlh, NFTA_CHAIN_TABLE, c->table); +@@ -404,7 +386,6 @@ void nftnl_chain_nlmsg_build_payload(struct nlmsghdr *nlh, const struct nftnl_ch + if (c->flags & (1 << NFTNL_CHAIN_TYPE)) + mnl_attr_put_strz(nlh, NFTA_CHAIN_TYPE, c->type); + } +-EXPORT_SYMBOL(nftnl_chain_nlmsg_build_payload); + + static int nftnl_chain_parse_attr_cb(const struct nlattr *attr, void *data) + { +@@ -529,7 +510,7 @@ static int nftnl_chain_parse_hook(struct nlattr *attr, struct nftnl_chain *c) + return 0; + } + +-int nftnl_chain_nlmsg_parse(const struct nlmsghdr *nlh, struct nftnl_chain *c) ++int __EXPORTED nftnl_chain_nlmsg_parse(const struct nlmsghdr *nlh, struct nftnl_chain *c) + { + struct nlattr *tb[NFTA_CHAIN_MAX+1] = {}; + struct nfgenmsg *nfg = mnl_nlmsg_get_payload(nlh); +@@ -590,7 +571,6 @@ int nftnl_chain_nlmsg_parse(const struct nlmsghdr *nlh, struct nftnl_chain *c) + + return ret; + } +-EXPORT_SYMBOL(nftnl_chain_nlmsg_parse); + + static inline int nftnl_str2hooknum(int family, const char *hook) + { +@@ -732,19 +712,17 @@ static int nftnl_chain_do_parse(struct nftnl_chain *c, enum nftnl_parse_type typ + return ret; + } + +-int nftnl_chain_parse(struct nftnl_chain *c, enum nftnl_parse_type type, ++int __EXPORTED nftnl_chain_parse(struct nftnl_chain *c, enum nftnl_parse_type type, + const char *data, struct nftnl_parse_err *err) + { + return nftnl_chain_do_parse(c, type, data, err, NFTNL_PARSE_BUFFER); + } +-EXPORT_SYMBOL(nftnl_chain_parse); + +-int nftnl_chain_parse_file(struct nftnl_chain *c, enum nftnl_parse_type type, ++int __EXPORTED nftnl_chain_parse_file(struct nftnl_chain *c, enum nftnl_parse_type type, + FILE *fp, struct nftnl_parse_err *err) + { + return nftnl_chain_do_parse(c, type, fp, err, NFTNL_PARSE_FILE); + } +-EXPORT_SYMBOL(nftnl_chain_parse_file); + + static int nftnl_chain_export(char *buf, size_t size, + const struct nftnl_chain *c, int type) +@@ -841,13 +819,12 @@ static int nftnl_chain_cmd_snprintf(char *buf, size_t size, + return offset; + } + +-int nftnl_chain_snprintf(char *buf, size_t size, const struct nftnl_chain *c, ++int __EXPORTED nftnl_chain_snprintf(char *buf, size_t size, const struct nftnl_chain *c, + uint32_t type, uint32_t flags) + { + return nftnl_chain_cmd_snprintf(buf, size, c, nftnl_flag2cmd(flags), type, + flags); + } +-EXPORT_SYMBOL(nftnl_chain_snprintf); + + static int nftnl_chain_do_snprintf(char *buf, size_t size, const void *c, + uint32_t cmd, uint32_t type, uint32_t flags) +@@ -855,19 +832,18 @@ static int nftnl_chain_do_snprintf(char *buf, size_t size, const void *c, + return nftnl_chain_snprintf(buf, size, c, type, flags); + } + +-int nftnl_chain_fprintf(FILE *fp, const struct nftnl_chain *c, uint32_t type, ++int __EXPORTED nftnl_chain_fprintf(FILE *fp, const struct nftnl_chain *c, uint32_t type, + uint32_t flags) + { + return nftnl_fprintf(fp, c, NFTNL_CMD_UNSPEC, type, flags, + nftnl_chain_do_snprintf); + } +-EXPORT_SYMBOL(nftnl_chain_fprintf); + + struct nftnl_chain_list { + struct list_head list; + }; + +-struct nftnl_chain_list *nftnl_chain_list_alloc(void) ++struct nftnl_chain_list __EXPORTED *nftnl_chain_list_alloc(void) + { + struct nftnl_chain_list *list; + +@@ -879,9 +855,8 @@ struct nftnl_chain_list *nftnl_chain_list_alloc(void) + + return list; + } +-EXPORT_SYMBOL(nftnl_chain_list_alloc); + +-void nftnl_chain_list_free(struct nftnl_chain_list *list) ++void __EXPORTED nftnl_chain_list_free(struct nftnl_chain_list *list) + { + struct nftnl_chain *r, *tmp; + +@@ -891,33 +866,28 @@ void nftnl_chain_list_free(struct nftnl_chain_list *list) + } + xfree(list); + } +-EXPORT_SYMBOL(nftnl_chain_list_free); + +-int nftnl_chain_list_is_empty(const struct nftnl_chain_list *list) ++int __EXPORTED nftnl_chain_list_is_empty(const struct nftnl_chain_list *list) + { + return list_empty(&list->list); + } +-EXPORT_SYMBOL(nftnl_chain_list_is_empty); + +-void nftnl_chain_list_add(struct nftnl_chain *r, struct nftnl_chain_list *list) ++void __EXPORTED nftnl_chain_list_add(struct nftnl_chain *r, struct nftnl_chain_list *list) + { + list_add(&r->head, &list->list); + } +-EXPORT_SYMBOL(nftnl_chain_list_add); + +-void nftnl_chain_list_add_tail(struct nftnl_chain *r, struct nftnl_chain_list *list) ++void __EXPORTED nftnl_chain_list_add_tail(struct nftnl_chain *r, struct nftnl_chain_list *list) + { + list_add_tail(&r->head, &list->list); + } +-EXPORT_SYMBOL(nftnl_chain_list_add_tail); + +-void nftnl_chain_list_del(struct nftnl_chain *r) ++void __EXPORTED nftnl_chain_list_del(struct nftnl_chain *r) + { + list_del(&r->head); + } +-EXPORT_SYMBOL(nftnl_chain_list_del); + +-int nftnl_chain_list_foreach(struct nftnl_chain_list *chain_list, ++int __EXPORTED nftnl_chain_list_foreach(struct nftnl_chain_list *chain_list, + int (*cb)(struct nftnl_chain *r, void *data), + void *data) + { +@@ -931,14 +901,13 @@ int nftnl_chain_list_foreach(struct nftnl_chain_list *chain_list, + } + return 0; + } +-EXPORT_SYMBOL(nftnl_chain_list_foreach); + + struct nftnl_chain_list_iter { + const struct nftnl_chain_list *list; + struct nftnl_chain *cur; + }; + +-struct nftnl_chain_list_iter * ++struct nftnl_chain_list_iter __EXPORTED * + nftnl_chain_list_iter_create(const struct nftnl_chain_list *l) + { + struct nftnl_chain_list_iter *iter; +@@ -955,9 +924,8 @@ nftnl_chain_list_iter_create(const struct nftnl_chain_list *l) + + return iter; + } +-EXPORT_SYMBOL(nftnl_chain_list_iter_create); + +-struct nftnl_chain *nftnl_chain_list_iter_next(struct nftnl_chain_list_iter *iter) ++struct nftnl_chain __EXPORTED *nftnl_chain_list_iter_next(struct nftnl_chain_list_iter *iter) + { + struct nftnl_chain *r = iter->cur; + +@@ -971,10 +939,8 @@ struct nftnl_chain *nftnl_chain_list_iter_next(struct nftnl_chain_list_iter *ite + + return r; + } +-EXPORT_SYMBOL(nftnl_chain_list_iter_next); + +-void nftnl_chain_list_iter_destroy(struct nftnl_chain_list_iter *iter) ++void __EXPORTED nftnl_chain_list_iter_destroy(struct nftnl_chain_list_iter *iter) + { + xfree(iter); + } +-EXPORT_SYMBOL(nftnl_chain_list_iter_destroy); +diff --git a/src/common.c b/src/common.c +index a95883c..68bce2e 100644 +--- a/src/common.c ++++ b/src/common.c +@@ -43,15 +43,14 @@ static struct nlmsghdr *__nftnl_nlmsg_build_hdr(char *buf, uint16_t type, + return nlh; + } + +-struct nlmsghdr *nftnl_nlmsg_build_hdr(char *buf, uint16_t type, uint16_t family, ++struct nlmsghdr __EXPORTED *nftnl_nlmsg_build_hdr(char *buf, uint16_t type, uint16_t family, + uint16_t flags, uint32_t seq) + { + return __nftnl_nlmsg_build_hdr(buf, (NFNL_SUBSYS_NFTABLES << 8) | type, + family, flags, seq, 0); + } +-EXPORT_SYMBOL(nftnl_nlmsg_build_hdr); + +-struct nftnl_parse_err *nftnl_parse_err_alloc(void) ++struct nftnl_parse_err __EXPORTED *nftnl_parse_err_alloc(void) + { + struct nftnl_parse_err *err; + +@@ -63,15 +62,13 @@ struct nftnl_parse_err *nftnl_parse_err_alloc(void) + + return err; + } +-EXPORT_SYMBOL(nftnl_parse_err_alloc); + +-void nftnl_parse_err_free(struct nftnl_parse_err *err) ++void __EXPORTED nftnl_parse_err_free(struct nftnl_parse_err *err) + { + xfree(err); + } +-EXPORT_SYMBOL(nftnl_parse_err_free); + +-int nftnl_parse_perror(const char *msg, struct nftnl_parse_err *err) ++int __EXPORTED nftnl_parse_perror(const char *msg, struct nftnl_parse_err *err) + { + switch (err->error) { + case NFTNL_PARSE_EBADINPUT: +@@ -89,7 +86,6 @@ int nftnl_parse_perror(const char *msg, struct nftnl_parse_err *err) + return fprintf(stderr, "%s: Undefined error\n", msg); + } + } +-EXPORT_SYMBOL(nftnl_parse_perror); + + int nftnl_cmd_header_snprintf(char *buf, size_t size, uint32_t cmd, uint32_t type, + uint32_t flags) +@@ -165,21 +161,19 @@ int nftnl_cmd_footer_fprintf(FILE *fp, uint32_t cmd, uint32_t type, + nftnl_cmd_footer_fprintf_cb); + } + +-struct nlmsghdr *nftnl_batch_begin(char *buf, uint32_t seq) ++struct nlmsghdr __EXPORTED *nftnl_batch_begin(char *buf, uint32_t seq) + { + return __nftnl_nlmsg_build_hdr(buf, NFNL_MSG_BATCH_BEGIN, AF_UNSPEC, + 0, seq, NFNL_SUBSYS_NFTABLES); + } +-EXPORT_SYMBOL(nftnl_batch_begin); + +-struct nlmsghdr *nftnl_batch_end(char *buf, uint32_t seq) ++struct nlmsghdr __EXPORTED *nftnl_batch_end(char *buf, uint32_t seq) + { + return __nftnl_nlmsg_build_hdr(buf, NFNL_MSG_BATCH_END, AF_UNSPEC, + 0, seq, NFNL_SUBSYS_NFTABLES); + } +-EXPORT_SYMBOL(nftnl_batch_end); + +-int nftnl_batch_is_supported(void) ++int __EXPORTED nftnl_batch_is_supported(void) + { + struct mnl_socket *nl; + struct mnl_nlmsg_batch *b; +@@ -236,4 +230,3 @@ err: + mnl_nlmsg_batch_stop(b); + return -1; + } +-EXPORT_SYMBOL(nftnl_batch_is_supported); +diff --git a/src/expr.c b/src/expr.c +index 10ba2c4..c7eb2b4 100644 +--- a/src/expr.c ++++ b/src/expr.c +@@ -24,7 +24,7 @@ + + #include <libnftnl/expr.h> + +-struct nftnl_expr *nftnl_expr_alloc(const char *name) ++struct nftnl_expr __EXPORTED *nftnl_expr_alloc(const char *name) + { + struct nftnl_expr *expr; + struct expr_ops *ops; +@@ -43,24 +43,21 @@ struct nftnl_expr *nftnl_expr_alloc(const char *name) + + return expr; + } +-EXPORT_SYMBOL(nftnl_expr_alloc); + +-void nftnl_expr_free(const struct nftnl_expr *expr) ++void __EXPORTED nftnl_expr_free(const struct nftnl_expr *expr) + { + if (expr->ops->free) + expr->ops->free(expr); + + xfree(expr); + } +-EXPORT_SYMBOL(nftnl_expr_free); + +-bool nftnl_expr_is_set(const struct nftnl_expr *expr, uint16_t type) ++bool __EXPORTED nftnl_expr_is_set(const struct nftnl_expr *expr, uint16_t type) + { + return expr->flags & (1 << type); + } +-EXPORT_SYMBOL(nftnl_expr_is_set); + +-int nftnl_expr_set(struct nftnl_expr *expr, uint16_t type, ++int __EXPORTED nftnl_expr_set(struct nftnl_expr *expr, uint16_t type, + const void *data, uint32_t data_len) + { + switch(type) { +@@ -73,43 +70,37 @@ int nftnl_expr_set(struct nftnl_expr *expr, uint16_t type, + expr->flags |= (1 << type); + return 0; + } +-EXPORT_SYMBOL(nftnl_expr_set); + +-void ++void __EXPORTED + nftnl_expr_set_u8(struct nftnl_expr *expr, uint16_t type, uint8_t data) + { + nftnl_expr_set(expr, type, &data, sizeof(uint8_t)); + } +-EXPORT_SYMBOL(nftnl_expr_set_u8); + +-void ++void __EXPORTED + nftnl_expr_set_u16(struct nftnl_expr *expr, uint16_t type, uint16_t data) + { + nftnl_expr_set(expr, type, &data, sizeof(uint16_t)); + } +-EXPORT_SYMBOL(nftnl_expr_set_u16); + +-void ++void __EXPORTED + nftnl_expr_set_u32(struct nftnl_expr *expr, uint16_t type, uint32_t data) + { + nftnl_expr_set(expr, type, &data, sizeof(uint32_t)); + } +-EXPORT_SYMBOL(nftnl_expr_set_u32); + +-void ++void __EXPORTED + nftnl_expr_set_u64(struct nftnl_expr *expr, uint16_t type, uint64_t data) + { + nftnl_expr_set(expr, type, &data, sizeof(uint64_t)); + } +-EXPORT_SYMBOL(nftnl_expr_set_u64); + +-int nftnl_expr_set_str(struct nftnl_expr *expr, uint16_t type, const char *str) ++int __EXPORTED nftnl_expr_set_str(struct nftnl_expr *expr, uint16_t type, const char *str) + { + return nftnl_expr_set(expr, type, str, strlen(str) + 1); + } +-EXPORT_SYMBOL(nftnl_expr_set_str); + +-const void *nftnl_expr_get(const struct nftnl_expr *expr, ++const void __EXPORTED *nftnl_expr_get(const struct nftnl_expr *expr, + uint16_t type, uint32_t *data_len) + { + const void *ret; +@@ -129,9 +120,8 @@ const void *nftnl_expr_get(const struct nftnl_expr *expr, + + return ret; + } +-EXPORT_SYMBOL(nftnl_expr_get); + +-uint8_t nftnl_expr_get_u8(const struct nftnl_expr *expr, uint16_t type) ++uint8_t __EXPORTED nftnl_expr_get_u8(const struct nftnl_expr *expr, uint16_t type) + { + const void *data; + uint32_t data_len; +@@ -145,9 +135,8 @@ uint8_t nftnl_expr_get_u8(const struct nftnl_expr *expr, uint16_t type) + + return *((uint8_t *)data); + } +-EXPORT_SYMBOL(nftnl_expr_get_u8); + +-uint16_t nftnl_expr_get_u16(const struct nftnl_expr *expr, uint16_t type) ++uint16_t __EXPORTED nftnl_expr_get_u16(const struct nftnl_expr *expr, uint16_t type) + { + const void *data; + uint32_t data_len; +@@ -161,9 +150,8 @@ uint16_t nftnl_expr_get_u16(const struct nftnl_expr *expr, uint16_t type) + + return *((uint16_t *)data); + } +-EXPORT_SYMBOL(nftnl_expr_get_u16); + +-uint32_t nftnl_expr_get_u32(const struct nftnl_expr *expr, uint16_t type) ++uint32_t __EXPORTED nftnl_expr_get_u32(const struct nftnl_expr *expr, uint16_t type) + { + const void *data; + uint32_t data_len; +@@ -177,9 +165,8 @@ uint32_t nftnl_expr_get_u32(const struct nftnl_expr *expr, uint16_t type) + + return *((uint32_t *)data); + } +-EXPORT_SYMBOL(nftnl_expr_get_u32); + +-uint64_t nftnl_expr_get_u64(const struct nftnl_expr *expr, uint16_t type) ++uint64_t __EXPORTED nftnl_expr_get_u64(const struct nftnl_expr *expr, uint16_t type) + { + const void *data; + uint32_t data_len; +@@ -193,17 +180,15 @@ uint64_t nftnl_expr_get_u64(const struct nftnl_expr *expr, uint16_t type) + + return *((uint64_t *)data); + } +-EXPORT_SYMBOL(nftnl_expr_get_u64); + +-const char *nftnl_expr_get_str(const struct nftnl_expr *expr, uint16_t type) ++const char __EXPORTED *nftnl_expr_get_str(const struct nftnl_expr *expr, uint16_t type) + { + uint32_t data_len; + + return (const char *)nftnl_expr_get(expr, type, &data_len); + } +-EXPORT_SYMBOL(nftnl_expr_get_str); + +-bool nftnl_expr_cmp(const struct nftnl_expr *e1, const struct nftnl_expr *e2) ++bool __EXPORTED nftnl_expr_cmp(const struct nftnl_expr *e1, const struct nftnl_expr *e2) + { + if (e1->flags != e2->flags || + strcmp(e1->ops->name, e2->ops->name) != 0) +@@ -211,7 +196,6 @@ bool nftnl_expr_cmp(const struct nftnl_expr *e1, const struct nftnl_expr *e2) + + return e1->ops->cmp(e1, e2); + } +-EXPORT_SYMBOL(nftnl_expr_cmp); + + void nftnl_expr_build_payload(struct nlmsghdr *nlh, struct nftnl_expr *expr) + { +@@ -275,7 +259,7 @@ err1: + return NULL; + } + +-int nftnl_expr_snprintf(char *buf, size_t size, const struct nftnl_expr *expr, ++int __EXPORTED nftnl_expr_snprintf(char *buf, size_t size, const struct nftnl_expr *expr, + uint32_t type, uint32_t flags) + { + int ret; +@@ -289,4 +273,3 @@ int nftnl_expr_snprintf(char *buf, size_t size, const struct nftnl_expr *expr, + + return offset; + } +-EXPORT_SYMBOL(nftnl_expr_snprintf); +diff --git a/src/gen.c b/src/gen.c +index 213562e..8b45caa 100644 +--- a/src/gen.c ++++ b/src/gen.c +@@ -29,25 +29,22 @@ struct nftnl_gen { + uint32_t flags; + }; + +-struct nftnl_gen *nftnl_gen_alloc(void) ++struct nftnl_gen __EXPORTED *nftnl_gen_alloc(void) + { + return calloc(1, sizeof(struct nftnl_gen)); + } +-EXPORT_SYMBOL(nftnl_gen_alloc); + +-void nftnl_gen_free(const struct nftnl_gen *gen) ++void __EXPORTED nftnl_gen_free(const struct nftnl_gen *gen) + { + xfree(gen); + } +-EXPORT_SYMBOL(nftnl_gen_free); + +-bool nftnl_gen_is_set(const struct nftnl_gen *gen, uint16_t attr) ++bool __EXPORTED nftnl_gen_is_set(const struct nftnl_gen *gen, uint16_t attr) + { + return gen->flags & (1 << attr); + } +-EXPORT_SYMBOL(nftnl_gen_is_set); + +-void nftnl_gen_unset(struct nftnl_gen *gen, uint16_t attr) ++void __EXPORTED nftnl_gen_unset(struct nftnl_gen *gen, uint16_t attr) + { + if (!(gen->flags & (1 << attr))) + return; +@@ -58,13 +55,12 @@ void nftnl_gen_unset(struct nftnl_gen *gen, uint16_t attr) + } + gen->flags &= ~(1 << attr); + } +-EXPORT_SYMBOL(nftnl_gen_unset); + + static uint32_t nftnl_gen_validate[NFTNL_GEN_MAX + 1] = { + [NFTNL_GEN_ID] = sizeof(uint32_t), + }; + +-int nftnl_gen_set_data(struct nftnl_gen *gen, uint16_t attr, ++int __EXPORTED nftnl_gen_set_data(struct nftnl_gen *gen, uint16_t attr, + const void *data, uint32_t data_len) + { + nftnl_assert_attr_exists(attr, NFTNL_GEN_MAX); +@@ -78,21 +74,18 @@ int nftnl_gen_set_data(struct nftnl_gen *gen, uint16_t attr, + gen->flags |= (1 << attr); + return 0; + } +-EXPORT_SYMBOL(nftnl_gen_set_data); + +-int nftnl_gen_set(struct nftnl_gen *gen, uint16_t attr, const void *data) ++int __EXPORTED nftnl_gen_set(struct nftnl_gen *gen, uint16_t attr, const void *data) + { + return nftnl_gen_set_data(gen, attr, data, nftnl_gen_validate[attr]); + } +-EXPORT_SYMBOL(nftnl_gen_set); + +-void nftnl_gen_set_u32(struct nftnl_gen *gen, uint16_t attr, uint32_t val) ++void __EXPORTED nftnl_gen_set_u32(struct nftnl_gen *gen, uint16_t attr, uint32_t val) + { + nftnl_gen_set_data(gen, attr, &val, sizeof(uint32_t)); + } +-EXPORT_SYMBOL(nftnl_gen_set_u32); + +-const void *nftnl_gen_get_data(const struct nftnl_gen *gen, uint16_t attr, ++const void __EXPORTED *nftnl_gen_get_data(const struct nftnl_gen *gen, uint16_t attr, + uint32_t *data_len) + { + if (!(gen->flags & (1 << attr))) +@@ -105,21 +98,18 @@ const void *nftnl_gen_get_data(const struct nftnl_gen *gen, uint16_t attr, + } + return NULL; + } +-EXPORT_SYMBOL(nftnl_gen_get_data); + +-const void *nftnl_gen_get(const struct nftnl_gen *gen, uint16_t attr) ++const void __EXPORTED *nftnl_gen_get(const struct nftnl_gen *gen, uint16_t attr) + { + uint32_t data_len; + return nftnl_gen_get_data(gen, attr, &data_len); + } +-EXPORT_SYMBOL(nftnl_gen_get); + +-uint32_t nftnl_gen_get_u32(const struct nftnl_gen *gen, uint16_t attr) ++uint32_t __EXPORTED nftnl_gen_get_u32(const struct nftnl_gen *gen, uint16_t attr) + { + const void *ret = nftnl_gen_get(gen, attr); + return ret == NULL ? 0 : *((uint32_t *)ret); + } +-EXPORT_SYMBOL(nftnl_gen_get_u32); + + static int nftnl_gen_parse_attr_cb(const struct nlattr *attr, void *data) + { +@@ -140,7 +130,7 @@ static int nftnl_gen_parse_attr_cb(const struct nlattr *attr, void *data) + return MNL_CB_OK; + } + +-int nftnl_gen_nlmsg_parse(const struct nlmsghdr *nlh, struct nftnl_gen *gen) ++int __EXPORTED nftnl_gen_nlmsg_parse(const struct nlmsghdr *nlh, struct nftnl_gen *gen) + { + struct nlattr *tb[NFTA_GEN_MAX + 1] = {}; + struct nfgenmsg *nfg = mnl_nlmsg_get_payload(nlh); +@@ -154,7 +144,6 @@ int nftnl_gen_nlmsg_parse(const struct nlmsghdr *nlh, struct nftnl_gen *gen) + } + return 0; + } +-EXPORT_SYMBOL(nftnl_gen_nlmsg_parse); + + static int nftnl_gen_snprintf_default(char *buf, size_t size, + const struct nftnl_gen *gen) +@@ -186,13 +175,12 @@ static int nftnl_gen_cmd_snprintf(char *buf, size_t size, + return offset; + } + +-int nftnl_gen_snprintf(char *buf, size_t size, const struct nftnl_gen *gen, ++int __EXPORTED nftnl_gen_snprintf(char *buf, size_t size, const struct nftnl_gen *gen, + uint32_t type, uint32_t flags) + {; + return nftnl_gen_cmd_snprintf(buf, size, gen, nftnl_flag2cmd(flags), type, + flags); + } +-EXPORT_SYMBOL(nftnl_gen_snprintf); + + static int nftnl_gen_do_snprintf(char *buf, size_t size, const void *gen, + uint32_t cmd, uint32_t type, uint32_t flags) +@@ -200,10 +188,9 @@ static int nftnl_gen_do_snprintf(char *buf, size_t size, const void *gen, + return nftnl_gen_snprintf(buf, size, gen, type, flags); + } + +-int nftnl_gen_fprintf(FILE *fp, const struct nftnl_gen *gen, uint32_t type, ++int __EXPORTED nftnl_gen_fprintf(FILE *fp, const struct nftnl_gen *gen, uint32_t type, + uint32_t flags) + { + return nftnl_fprintf(fp, gen, NFTNL_CMD_UNSPEC, type, flags, + nftnl_gen_do_snprintf); + } +-EXPORT_SYMBOL(nftnl_gen_fprintf); +diff --git a/src/object.c b/src/object.c +index e1a5ac4..d409c6d 100644 +--- a/src/object.c ++++ b/src/object.c +@@ -39,13 +39,12 @@ static struct obj_ops *nftnl_obj_ops_lookup(uint32_t type) + return obj_ops[type]; + } + +-struct nftnl_obj *nftnl_obj_alloc(void) ++struct nftnl_obj __EXPORTED *nftnl_obj_alloc(void) + { + return calloc(1, sizeof(struct nftnl_obj)); + } +-EXPORT_SYMBOL(nftnl_obj_alloc); + +-void nftnl_obj_free(const struct nftnl_obj *obj) ++void __EXPORTED nftnl_obj_free(const struct nftnl_obj *obj) + { + if (obj->flags & (1 << NFTNL_OBJ_TABLE)) + xfree(obj->table); +@@ -54,20 +53,18 @@ void nftnl_obj_free(const struct nftnl_obj *obj) + + xfree(obj); + } +-EXPORT_SYMBOL(nftnl_obj_free); + +-bool nftnl_obj_is_set(const struct nftnl_obj *obj, uint16_t attr) ++bool __EXPORTED nftnl_obj_is_set(const struct nftnl_obj *obj, uint16_t attr) + { + return obj->flags & (1 << attr); + } +-EXPORT_SYMBOL(nftnl_obj_is_set); + + static uint32_t nftnl_obj_validate[NFTNL_OBJ_MAX + 1] = { + [NFTNL_OBJ_FAMILY] = sizeof(uint32_t), + [NFTNL_OBJ_USE] = sizeof(uint32_t), + }; + +-void nftnl_obj_set_data(struct nftnl_obj *obj, uint16_t attr, ++void __EXPORTED nftnl_obj_set_data(struct nftnl_obj *obj, uint16_t attr, + const void *data, uint32_t data_len) + { + if (attr < NFTNL_OBJ_MAX) +@@ -100,45 +97,38 @@ void nftnl_obj_set_data(struct nftnl_obj *obj, uint16_t attr, + } + obj->flags |= (1 << attr); + } +-EXPORT_SYMBOL(nftnl_obj_set_data); + +-void nftnl_obj_set(struct nftnl_obj *obj, uint16_t attr, const void *data) ++void __EXPORTED nftnl_obj_set(struct nftnl_obj *obj, uint16_t attr, const void *data) + { + nftnl_obj_set_data(obj, attr, data, nftnl_obj_validate[attr]); + } +-EXPORT_SYMBOL(nftnl_obj_set); + +-void nftnl_obj_set_u8(struct nftnl_obj *obj, uint16_t attr, uint8_t val) ++void __EXPORTED nftnl_obj_set_u8(struct nftnl_obj *obj, uint16_t attr, uint8_t val) + { + nftnl_obj_set_data(obj, attr, &val, sizeof(uint8_t)); + } +-EXPORT_SYMBOL(nftnl_obj_set_u8); + +-void nftnl_obj_set_u16(struct nftnl_obj *obj, uint16_t attr, uint16_t val) ++void __EXPORTED nftnl_obj_set_u16(struct nftnl_obj *obj, uint16_t attr, uint16_t val) + { + nftnl_obj_set_data(obj, attr, &val, sizeof(uint16_t)); + } +-EXPORT_SYMBOL(nftnl_obj_set_u16); + +-void nftnl_obj_set_u32(struct nftnl_obj *obj, uint16_t attr, uint32_t val) ++void __EXPORTED nftnl_obj_set_u32(struct nftnl_obj *obj, uint16_t attr, uint32_t val) + { + nftnl_obj_set_data(obj, attr, &val, sizeof(uint32_t)); + } +-EXPORT_SYMBOL(nftnl_obj_set_u32); + +-void nftnl_obj_set_u64(struct nftnl_obj *obj, uint16_t attr, uint64_t val) ++void __EXPORTED nftnl_obj_set_u64(struct nftnl_obj *obj, uint16_t attr, uint64_t val) + { + nftnl_obj_set_data(obj, attr, &val, sizeof(uint64_t)); + } +-EXPORT_SYMBOL(nftnl_obj_set_u64); + +-void nftnl_obj_set_str(struct nftnl_obj *obj, uint16_t attr, const char *str) ++void __EXPORTED nftnl_obj_set_str(struct nftnl_obj *obj, uint16_t attr, const char *str) + { + nftnl_obj_set_data(obj, attr, str, 0); + } +-EXPORT_SYMBOL(nftnl_obj_set_str); + +-const void *nftnl_obj_get_data(struct nftnl_obj *obj, uint16_t attr, ++const void __EXPORTED *nftnl_obj_get_data(struct nftnl_obj *obj, uint16_t attr, + uint32_t *data_len) + { + if (!(obj->flags & (1 << attr))) +@@ -168,50 +158,43 @@ const void *nftnl_obj_get_data(struct nftnl_obj *obj, uint16_t attr, + } + return NULL; + } +-EXPORT_SYMBOL(nftnl_obj_get_data); + +-const void *nftnl_obj_get(struct nftnl_obj *obj, uint16_t attr) ++const void __EXPORTED *nftnl_obj_get(struct nftnl_obj *obj, uint16_t attr) + { + uint32_t data_len; + return nftnl_obj_get_data(obj, attr, &data_len); + } +-EXPORT_SYMBOL(nftnl_obj_get); + +-uint8_t nftnl_obj_get_u8(struct nftnl_obj *obj, uint16_t attr) ++uint8_t __EXPORTED nftnl_obj_get_u8(struct nftnl_obj *obj, uint16_t attr) + { + const void *ret = nftnl_obj_get(obj, attr); + return ret == NULL ? 0 : *((uint8_t *)ret); + } +-EXPORT_SYMBOL(nftnl_obj_get_u8); + +-uint16_t nftnl_obj_get_u16(struct nftnl_obj *obj, uint16_t attr) ++uint16_t __EXPORTED nftnl_obj_get_u16(struct nftnl_obj *obj, uint16_t attr) + { + const void *ret = nftnl_obj_get(obj, attr); + return ret == NULL ? 0 : *((uint16_t *)ret); + } +-EXPORT_SYMBOL(nftnl_obj_get_u16); + +-uint32_t nftnl_obj_get_u32(struct nftnl_obj *obj, uint16_t attr) ++uint32_t __EXPORTED nftnl_obj_get_u32(struct nftnl_obj *obj, uint16_t attr) + { + const void *ret = nftnl_obj_get(obj, attr); + return ret == NULL ? 0 : *((uint32_t *)ret); + } +-EXPORT_SYMBOL(nftnl_obj_get_u32); + +-uint64_t nftnl_obj_get_u64(struct nftnl_obj *obj, uint16_t attr) ++uint64_t __EXPORTED nftnl_obj_get_u64(struct nftnl_obj *obj, uint16_t attr) + { + const void *ret = nftnl_obj_get(obj, attr); + return ret == NULL ? 0 : *((uint64_t *)ret); + } +-EXPORT_SYMBOL(nftnl_obj_get_u64); + +-const char *nftnl_obj_get_str(struct nftnl_obj *obj, uint16_t attr) ++const char __EXPORTED *nftnl_obj_get_str(struct nftnl_obj *obj, uint16_t attr) + { + return nftnl_obj_get(obj, attr); + } +-EXPORT_SYMBOL(nftnl_obj_get_str); + +-void nftnl_obj_nlmsg_build_payload(struct nlmsghdr *nlh, ++void __EXPORTED nftnl_obj_nlmsg_build_payload(struct nlmsghdr *nlh, + const struct nftnl_obj *obj) + { + if (obj->flags & (1 << NFTNL_OBJ_TABLE)) +@@ -228,7 +211,6 @@ void nftnl_obj_nlmsg_build_payload(struct nlmsghdr *nlh, + mnl_attr_nest_end(nlh, nest); + } + } +-EXPORT_SYMBOL(nftnl_obj_nlmsg_build_payload); + + static int nftnl_obj_parse_attr_cb(const struct nlattr *attr, void *data) + { +@@ -258,7 +240,7 @@ static int nftnl_obj_parse_attr_cb(const struct nlattr *attr, void *data) + return MNL_CB_OK; + } + +-int nftnl_obj_nlmsg_parse(const struct nlmsghdr *nlh, struct nftnl_obj *obj) ++int __EXPORTED nftnl_obj_nlmsg_parse(const struct nlmsghdr *nlh, struct nftnl_obj *obj) + { + struct nfgenmsg *nfg = mnl_nlmsg_get_payload(nlh); + struct nlattr *tb[NFTA_OBJ_MAX + 1] = {}; +@@ -299,7 +281,6 @@ int nftnl_obj_nlmsg_parse(const struct nlmsghdr *nlh, struct nftnl_obj *obj) + + return 0; + } +-EXPORT_SYMBOL(nftnl_obj_nlmsg_parse); + + #ifdef JSON_PARSING + static int nftnl_jansson_parse_obj(struct nftnl_obj *t, json_t *tree, +@@ -377,19 +358,17 @@ static int nftnl_obj_do_parse(struct nftnl_obj *obj, enum nftnl_parse_type type, + return ret; + } + +-int nftnl_obj_parse(struct nftnl_obj *obj, enum nftnl_parse_type type, ++int __EXPORTED nftnl_obj_parse(struct nftnl_obj *obj, enum nftnl_parse_type type, + const char *data, struct nftnl_parse_err *err) + { + return nftnl_obj_do_parse(obj, type, data, err, NFTNL_PARSE_BUFFER); + } +-EXPORT_SYMBOL(nftnl_obj_parse); + +-int nftnl_obj_parse_file(struct nftnl_obj *obj, enum nftnl_parse_type type, ++int __EXPORTED nftnl_obj_parse_file(struct nftnl_obj *obj, enum nftnl_parse_type type, + FILE *fp, struct nftnl_parse_err *err) + { + return nftnl_obj_do_parse(obj, type, fp, err, NFTNL_PARSE_FILE); + } +-EXPORT_SYMBOL(nftnl_obj_parse_file); + + static int nftnl_obj_export(char *buf, size_t size, + const struct nftnl_obj *obj, +@@ -469,13 +448,12 @@ static int nftnl_obj_cmd_snprintf(char *buf, size_t size, + return offset; + } + +-int nftnl_obj_snprintf(char *buf, size_t size, const struct nftnl_obj *obj, ++int __EXPORTED nftnl_obj_snprintf(char *buf, size_t size, const struct nftnl_obj *obj, + uint32_t type, uint32_t flags) + { + return nftnl_obj_cmd_snprintf(buf, size, obj, nftnl_flag2cmd(flags), + type, flags); + } +-EXPORT_SYMBOL(nftnl_obj_snprintf); + + static int nftnl_obj_do_snprintf(char *buf, size_t size, const void *obj, + uint32_t cmd, uint32_t type, uint32_t flags) +@@ -483,19 +461,18 @@ static int nftnl_obj_do_snprintf(char *buf, size_t size, const void *obj, + return nftnl_obj_snprintf(buf, size, obj, type, flags); + } + +-int nftnl_obj_fprintf(FILE *fp, const struct nftnl_obj *obj, uint32_t type, ++int __EXPORTED nftnl_obj_fprintf(FILE *fp, const struct nftnl_obj *obj, uint32_t type, + uint32_t flags) + { + return nftnl_fprintf(fp, obj, NFTNL_CMD_UNSPEC, type, flags, + nftnl_obj_do_snprintf); + } +-EXPORT_SYMBOL(nftnl_obj_fprintf); + + struct nftnl_obj_list { + struct list_head list; + }; + +-struct nftnl_obj_list *nftnl_obj_list_alloc(void) ++struct nftnl_obj_list __EXPORTED *nftnl_obj_list_alloc(void) + { + struct nftnl_obj_list *list; + +@@ -507,9 +484,8 @@ struct nftnl_obj_list *nftnl_obj_list_alloc(void) + + return list; + } +-EXPORT_SYMBOL(nftnl_obj_list_alloc); + +-void nftnl_obj_list_free(struct nftnl_obj_list *list) ++void __EXPORTED nftnl_obj_list_free(struct nftnl_obj_list *list) + { + struct nftnl_obj *r, *tmp; + +@@ -519,34 +495,29 @@ void nftnl_obj_list_free(struct nftnl_obj_list *list) + } + xfree(list); + } +-EXPORT_SYMBOL(nftnl_obj_list_free); + +-int nftnl_obj_list_is_empty(struct nftnl_obj_list *list) ++int __EXPORTED nftnl_obj_list_is_empty(struct nftnl_obj_list *list) + { + return list_empty(&list->list); + } +-EXPORT_SYMBOL(nftnl_obj_list_is_empty); + +-void nftnl_obj_list_add(struct nftnl_obj *r, struct nftnl_obj_list *list) ++void __EXPORTED nftnl_obj_list_add(struct nftnl_obj *r, struct nftnl_obj_list *list) + { + list_add(&r->head, &list->list); + } +-EXPORT_SYMBOL(nftnl_obj_list_add); + +-void nftnl_obj_list_add_tail(struct nftnl_obj *r, ++void __EXPORTED nftnl_obj_list_add_tail(struct nftnl_obj *r, + struct nftnl_obj_list *list) + { + list_add_tail(&r->head, &list->list); + } +-EXPORT_SYMBOL(nftnl_obj_list_add_tail); + +-void nftnl_obj_list_del(struct nftnl_obj *t) ++void __EXPORTED nftnl_obj_list_del(struct nftnl_obj *t) + { + list_del(&t->head); + } +-EXPORT_SYMBOL(nftnl_obj_list_del); + +-int nftnl_obj_list_foreach(struct nftnl_obj_list *table_list, ++int __EXPORTED nftnl_obj_list_foreach(struct nftnl_obj_list *table_list, + int (*cb)(struct nftnl_obj *t, void *data), + void *data) + { +@@ -560,14 +531,13 @@ int nftnl_obj_list_foreach(struct nftnl_obj_list *table_list, + } + return 0; + } +-EXPORT_SYMBOL(nftnl_obj_list_foreach); + + struct nftnl_obj_list_iter { + struct nftnl_obj_list *list; + struct nftnl_obj *cur; + }; + +-struct nftnl_obj_list_iter * ++struct nftnl_obj_list_iter __EXPORTED * + nftnl_obj_list_iter_create(struct nftnl_obj_list *l) + { + struct nftnl_obj_list_iter *iter; +@@ -584,9 +554,8 @@ nftnl_obj_list_iter_create(struct nftnl_obj_list *l) + + return iter; + } +-EXPORT_SYMBOL(nftnl_obj_list_iter_create); + +-struct nftnl_obj *nftnl_obj_list_iter_next(struct nftnl_obj_list_iter *iter) ++struct nftnl_obj __EXPORTED *nftnl_obj_list_iter_next(struct nftnl_obj_list_iter *iter) + { + struct nftnl_obj *r = iter->cur; + +@@ -600,10 +569,8 @@ struct nftnl_obj *nftnl_obj_list_iter_next(struct nftnl_obj_list_iter *iter) + + return r; + } +-EXPORT_SYMBOL(nftnl_obj_list_iter_next); + +-void nftnl_obj_list_iter_destroy(struct nftnl_obj_list_iter *iter) ++void __EXPORTED nftnl_obj_list_iter_destroy(struct nftnl_obj_list_iter *iter) + { + xfree(iter); + } +-EXPORT_SYMBOL(nftnl_obj_list_iter_destroy); +diff --git a/src/rule.c b/src/rule.c +index 6c22141..ad8609f 100644 +--- a/src/rule.c ++++ b/src/rule.c +@@ -52,7 +52,7 @@ struct nftnl_rule { + struct list_head expr_list; + }; + +-struct nftnl_rule *nftnl_rule_alloc(void) ++struct nftnl_rule __EXPORTED *nftnl_rule_alloc(void) + { + struct nftnl_rule *r; + +@@ -64,9 +64,8 @@ struct nftnl_rule *nftnl_rule_alloc(void) + + return r; + } +-EXPORT_SYMBOL(nftnl_rule_alloc); + +-void nftnl_rule_free(const struct nftnl_rule *r) ++void __EXPORTED nftnl_rule_free(const struct nftnl_rule *r) + { + struct nftnl_expr *e, *tmp; + +@@ -82,15 +81,13 @@ void nftnl_rule_free(const struct nftnl_rule *r) + + xfree(r); + } +-EXPORT_SYMBOL(nftnl_rule_free); + +-bool nftnl_rule_is_set(const struct nftnl_rule *r, uint16_t attr) ++bool __EXPORTED nftnl_rule_is_set(const struct nftnl_rule *r, uint16_t attr) + { + return r->flags & (1 << attr); + } +-EXPORT_SYMBOL(nftnl_rule_is_set); + +-void nftnl_rule_unset(struct nftnl_rule *r, uint16_t attr) ++void __EXPORTED nftnl_rule_unset(struct nftnl_rule *r, uint16_t attr) + { + if (!(r->flags & (1 << attr))) + return; +@@ -116,7 +113,6 @@ void nftnl_rule_unset(struct nftnl_rule *r, uint16_t attr) + + r->flags &= ~(1 << attr); + } +-EXPORT_SYMBOL(nftnl_rule_unset); + + static uint32_t nftnl_rule_validate[NFTNL_RULE_MAX + 1] = { + [NFTNL_RULE_HANDLE] = sizeof(uint64_t), +@@ -127,7 +123,7 @@ static uint32_t nftnl_rule_validate[NFTNL_RULE_MAX + 1] = { + [NFTNL_RULE_ID] = sizeof(uint32_t), + }; + +-int nftnl_rule_set_data(struct nftnl_rule *r, uint16_t attr, ++int __EXPORTED nftnl_rule_set_data(struct nftnl_rule *r, uint16_t attr, + const void *data, uint32_t data_len) + { + nftnl_assert_attr_exists(attr, NFTNL_RULE_MAX); +@@ -183,33 +179,28 @@ int nftnl_rule_set_data(struct nftnl_rule *r, uint16_t attr, + r->flags |= (1 << attr); + return 0; + } +-EXPORT_SYMBOL(nftnl_rule_set_data); + +-int nftnl_rule_set(struct nftnl_rule *r, uint16_t attr, const void *data) ++int __EXPORTED nftnl_rule_set(struct nftnl_rule *r, uint16_t attr, const void *data) + { + return nftnl_rule_set_data(r, attr, data, nftnl_rule_validate[attr]); + } +-EXPORT_SYMBOL(nftnl_rule_set); + +-void nftnl_rule_set_u32(struct nftnl_rule *r, uint16_t attr, uint32_t val) ++void __EXPORTED nftnl_rule_set_u32(struct nftnl_rule *r, uint16_t attr, uint32_t val) + { + nftnl_rule_set_data(r, attr, &val, sizeof(uint32_t)); + } +-EXPORT_SYMBOL(nftnl_rule_set_u32); + +-void nftnl_rule_set_u64(struct nftnl_rule *r, uint16_t attr, uint64_t val) ++void __EXPORTED nftnl_rule_set_u64(struct nftnl_rule *r, uint16_t attr, uint64_t val) + { + nftnl_rule_set_data(r, attr, &val, sizeof(uint64_t)); + } +-EXPORT_SYMBOL(nftnl_rule_set_u64); + +-int nftnl_rule_set_str(struct nftnl_rule *r, uint16_t attr, const char *str) ++int __EXPORTED nftnl_rule_set_str(struct nftnl_rule *r, uint16_t attr, const char *str) + { + return nftnl_rule_set_data(r, attr, str, strlen(str) + 1); + } +-EXPORT_SYMBOL(nftnl_rule_set_str); + +-const void *nftnl_rule_get_data(const struct nftnl_rule *r, uint16_t attr, ++const void __EXPORTED *nftnl_rule_get_data(const struct nftnl_rule *r, uint16_t attr, + uint32_t *data_len) + { + if (!(r->flags & (1 << attr))) +@@ -246,22 +237,19 @@ const void *nftnl_rule_get_data(const struct nftnl_rule *r, uint16_t attr, + } + return NULL; + } +-EXPORT_SYMBOL(nftnl_rule_get_data); + +-const void *nftnl_rule_get(const struct nftnl_rule *r, uint16_t attr) ++const void __EXPORTED *nftnl_rule_get(const struct nftnl_rule *r, uint16_t attr) + { + uint32_t data_len; + return nftnl_rule_get_data(r, attr, &data_len); + } +-EXPORT_SYMBOL(nftnl_rule_get); + +-const char *nftnl_rule_get_str(const struct nftnl_rule *r, uint16_t attr) ++const char __EXPORTED *nftnl_rule_get_str(const struct nftnl_rule *r, uint16_t attr) + { + return nftnl_rule_get(r, attr); + } +-EXPORT_SYMBOL(nftnl_rule_get_str); + +-uint32_t nftnl_rule_get_u32(const struct nftnl_rule *r, uint16_t attr) ++uint32_t __EXPORTED nftnl_rule_get_u32(const struct nftnl_rule *r, uint16_t attr) + { + uint32_t data_len; + const uint32_t *val = nftnl_rule_get_data(r, attr, &data_len); +@@ -270,9 +258,8 @@ uint32_t nftnl_rule_get_u32(const struct nftnl_rule *r, uint16_t attr) + + return val ? *val : 0; + } +-EXPORT_SYMBOL(nftnl_rule_get_u32); + +-uint64_t nftnl_rule_get_u64(const struct nftnl_rule *r, uint16_t attr) ++uint64_t __EXPORTED nftnl_rule_get_u64(const struct nftnl_rule *r, uint16_t attr) + { + uint32_t data_len; + const uint64_t *val = nftnl_rule_get_data(r, attr, &data_len); +@@ -281,9 +268,8 @@ uint64_t nftnl_rule_get_u64(const struct nftnl_rule *r, uint16_t attr) + + return val ? *val : 0; + } +-EXPORT_SYMBOL(nftnl_rule_get_u64); + +-uint8_t nftnl_rule_get_u8(const struct nftnl_rule *r, uint16_t attr) ++uint8_t __EXPORTED nftnl_rule_get_u8(const struct nftnl_rule *r, uint16_t attr) + { + uint32_t data_len; + const uint8_t *val = nftnl_rule_get_data(r, attr, &data_len); +@@ -292,9 +278,8 @@ uint8_t nftnl_rule_get_u8(const struct nftnl_rule *r, uint16_t attr) + + return val ? *val : 0; + } +-EXPORT_SYMBOL(nftnl_rule_get_u8); + +-void nftnl_rule_nlmsg_build_payload(struct nlmsghdr *nlh, struct nftnl_rule *r) ++void __EXPORTED nftnl_rule_nlmsg_build_payload(struct nlmsghdr *nlh, struct nftnl_rule *r) + { + struct nftnl_expr *expr; + struct nlattr *nest, *nest2; +@@ -335,13 +320,11 @@ void nftnl_rule_nlmsg_build_payload(struct nlmsghdr *nlh, struct nftnl_rule *r) + if (r->flags & (1 << NFTNL_RULE_ID)) + mnl_attr_put_u32(nlh, NFTA_RULE_ID, htonl(r->id)); + } +-EXPORT_SYMBOL(nftnl_rule_nlmsg_build_payload); + +-void nftnl_rule_add_expr(struct nftnl_rule *r, struct nftnl_expr *expr) ++void __EXPORTED nftnl_rule_add_expr(struct nftnl_rule *r, struct nftnl_expr *expr) + { + list_add_tail(&expr->head, &r->expr_list); + } +-EXPORT_SYMBOL(nftnl_rule_add_expr); + + static int nftnl_rule_parse_attr_cb(const struct nlattr *attr, void *data) + { +@@ -441,7 +424,7 @@ static int nftnl_rule_parse_compat(struct nlattr *nest, struct nftnl_rule *r) + return 0; + } + +-int nftnl_rule_nlmsg_parse(const struct nlmsghdr *nlh, struct nftnl_rule *r) ++int __EXPORTED nftnl_rule_nlmsg_parse(const struct nlmsghdr *nlh, struct nftnl_rule *r) + { + struct nlattr *tb[NFTA_RULE_MAX+1] = {}; + struct nfgenmsg *nfg = mnl_nlmsg_get_payload(nlh); +@@ -510,7 +493,6 @@ int nftnl_rule_nlmsg_parse(const struct nlmsghdr *nlh, struct nftnl_rule *r) + + return 0; + } +-EXPORT_SYMBOL(nftnl_rule_nlmsg_parse); + + #ifdef JSON_PARSING + int nftnl_jansson_parse_rule(struct nftnl_rule *r, json_t *tree, +@@ -658,19 +640,17 @@ static int nftnl_rule_do_parse(struct nftnl_rule *r, enum nftnl_parse_type type, + + return ret; + } +-int nftnl_rule_parse(struct nftnl_rule *r, enum nftnl_parse_type type, ++int __EXPORTED nftnl_rule_parse(struct nftnl_rule *r, enum nftnl_parse_type type, + const char *data, struct nftnl_parse_err *err) + { + return nftnl_rule_do_parse(r, type, data, err, NFTNL_PARSE_BUFFER); + } +-EXPORT_SYMBOL(nftnl_rule_parse); + +-int nftnl_rule_parse_file(struct nftnl_rule *r, enum nftnl_parse_type type, ++int __EXPORTED nftnl_rule_parse_file(struct nftnl_rule *r, enum nftnl_parse_type type, + FILE *fp, struct nftnl_parse_err *err) + { + return nftnl_rule_do_parse(r, type, fp, err, NFTNL_PARSE_FILE); + } +-EXPORT_SYMBOL(nftnl_rule_parse_file); + + static int nftnl_rule_export(char *buf, size_t size, + const struct nftnl_rule *r, +@@ -819,13 +799,12 @@ static int nftnl_rule_cmd_snprintf(char *buf, size_t size, + return offset; + } + +-int nftnl_rule_snprintf(char *buf, size_t size, const struct nftnl_rule *r, ++int __EXPORTED nftnl_rule_snprintf(char *buf, size_t size, const struct nftnl_rule *r, + uint32_t type, uint32_t flags) + { + return nftnl_rule_cmd_snprintf(buf, size, r, nftnl_flag2cmd(flags), type, + flags); + } +-EXPORT_SYMBOL(nftnl_rule_snprintf); + + static int nftnl_rule_do_snprintf(char *buf, size_t size, const void *r, + uint32_t cmd, uint32_t type, uint32_t flags) +@@ -833,15 +812,14 @@ static int nftnl_rule_do_snprintf(char *buf, size_t size, const void *r, + return nftnl_rule_snprintf(buf, size, r, type, flags); + } + +-int nftnl_rule_fprintf(FILE *fp, const struct nftnl_rule *r, uint32_t type, ++int __EXPORTED nftnl_rule_fprintf(FILE *fp, const struct nftnl_rule *r, uint32_t type, + uint32_t flags) + { + return nftnl_fprintf(fp, r, NFTNL_CMD_UNSPEC, type, flags, + nftnl_rule_do_snprintf); + } +-EXPORT_SYMBOL(nftnl_rule_fprintf); + +-int nftnl_expr_foreach(struct nftnl_rule *r, ++int __EXPORTED nftnl_expr_foreach(struct nftnl_rule *r, + int (*cb)(struct nftnl_expr *e, void *data), + void *data) + { +@@ -855,7 +833,6 @@ int nftnl_expr_foreach(struct nftnl_rule *r, + } + return 0; + } +-EXPORT_SYMBOL(nftnl_expr_foreach); + + struct nftnl_expr_iter { + const struct nftnl_rule *r; +@@ -873,7 +850,7 @@ static void nftnl_expr_iter_init(const struct nftnl_rule *r, + head); + } + +-struct nftnl_expr_iter *nftnl_expr_iter_create(const struct nftnl_rule *r) ++struct nftnl_expr_iter __EXPORTED *nftnl_expr_iter_create(const struct nftnl_rule *r) + { + struct nftnl_expr_iter *iter; + +@@ -885,9 +862,8 @@ struct nftnl_expr_iter *nftnl_expr_iter_create(const struct nftnl_rule *r) + + return iter; + } +-EXPORT_SYMBOL(nftnl_expr_iter_create); + +-struct nftnl_expr *nftnl_expr_iter_next(struct nftnl_expr_iter *iter) ++struct nftnl_expr __EXPORTED *nftnl_expr_iter_next(struct nftnl_expr_iter *iter) + { + struct nftnl_expr *expr = iter->cur; + +@@ -901,15 +877,13 @@ struct nftnl_expr *nftnl_expr_iter_next(struct nftnl_expr_iter *iter) + + return expr; + } +-EXPORT_SYMBOL(nftnl_expr_iter_next); + +-void nftnl_expr_iter_destroy(struct nftnl_expr_iter *iter) ++void __EXPORTED nftnl_expr_iter_destroy(struct nftnl_expr_iter *iter) + { + xfree(iter); + } +-EXPORT_SYMBOL(nftnl_expr_iter_destroy); + +-bool nftnl_rule_cmp(const struct nftnl_rule *r1, const struct nftnl_rule *r2) ++bool __EXPORTED nftnl_rule_cmp(const struct nftnl_rule *r1, const struct nftnl_rule *r2) + { + struct nftnl_expr_iter it1, it2; + struct nftnl_expr *e1, *e2; +@@ -938,13 +912,12 @@ bool nftnl_rule_cmp(const struct nftnl_rule *r1, const struct nftnl_rule *r2) + + return eq; + } +-EXPORT_SYMBOL(nftnl_rule_cmp); + + struct nftnl_rule_list { + struct list_head list; + }; + +-struct nftnl_rule_list *nftnl_rule_list_alloc(void) ++struct nftnl_rule_list __EXPORTED *nftnl_rule_list_alloc(void) + { + struct nftnl_rule_list *list; + +@@ -956,9 +929,8 @@ struct nftnl_rule_list *nftnl_rule_list_alloc(void) + + return list; + } +-EXPORT_SYMBOL(nftnl_rule_list_alloc); + +-void nftnl_rule_list_free(struct nftnl_rule_list *list) ++void __EXPORTED nftnl_rule_list_free(struct nftnl_rule_list *list) + { + struct nftnl_rule *r, *tmp; + +@@ -968,33 +940,28 @@ void nftnl_rule_list_free(struct nftnl_rule_list *list) + } + xfree(list); + } +-EXPORT_SYMBOL(nftnl_rule_list_free); + +-int nftnl_rule_list_is_empty(const struct nftnl_rule_list *list) ++int __EXPORTED nftnl_rule_list_is_empty(const struct nftnl_rule_list *list) + { + return list_empty(&list->list); + } +-EXPORT_SYMBOL(nftnl_rule_list_is_empty); + +-void nftnl_rule_list_add(struct nftnl_rule *r, struct nftnl_rule_list *list) ++void __EXPORTED nftnl_rule_list_add(struct nftnl_rule *r, struct nftnl_rule_list *list) + { + list_add(&r->head, &list->list); + } +-EXPORT_SYMBOL(nftnl_rule_list_add); + +-void nftnl_rule_list_add_tail(struct nftnl_rule *r, struct nftnl_rule_list *list) ++void __EXPORTED nftnl_rule_list_add_tail(struct nftnl_rule *r, struct nftnl_rule_list *list) + { + list_add_tail(&r->head, &list->list); + } +-EXPORT_SYMBOL(nftnl_rule_list_add_tail); + +-void nftnl_rule_list_del(struct nftnl_rule *r) ++void __EXPORTED nftnl_rule_list_del(struct nftnl_rule *r) + { + list_del(&r->head); + } +-EXPORT_SYMBOL(nftnl_rule_list_del); + +-int nftnl_rule_list_foreach(struct nftnl_rule_list *rule_list, ++int __EXPORTED nftnl_rule_list_foreach(struct nftnl_rule_list *rule_list, + int (*cb)(struct nftnl_rule *r, void *data), + void *data) + { +@@ -1008,14 +975,13 @@ int nftnl_rule_list_foreach(struct nftnl_rule_list *rule_list, + } + return 0; + } +-EXPORT_SYMBOL(nftnl_rule_list_foreach); + + struct nftnl_rule_list_iter { + const struct nftnl_rule_list *list; + struct nftnl_rule *cur; + }; + +-struct nftnl_rule_list_iter * ++struct nftnl_rule_list_iter __EXPORTED * + nftnl_rule_list_iter_create(const struct nftnl_rule_list *l) + { + struct nftnl_rule_list_iter *iter; +@@ -1032,15 +998,13 @@ nftnl_rule_list_iter_create(const struct nftnl_rule_list *l) + + return iter; + } +-EXPORT_SYMBOL(nftnl_rule_list_iter_create); + +-struct nftnl_rule *nftnl_rule_list_iter_cur(struct nftnl_rule_list_iter *iter) ++struct nftnl_rule __EXPORTED *nftnl_rule_list_iter_cur(struct nftnl_rule_list_iter *iter) + { + return iter->cur; + } +-EXPORT_SYMBOL(nftnl_rule_list_iter_cur); + +-struct nftnl_rule *nftnl_rule_list_iter_next(struct nftnl_rule_list_iter *iter) ++struct nftnl_rule __EXPORTED *nftnl_rule_list_iter_next(struct nftnl_rule_list_iter *iter) + { + struct nftnl_rule *r = iter->cur; + +@@ -1054,10 +1018,8 @@ struct nftnl_rule *nftnl_rule_list_iter_next(struct nftnl_rule_list_iter *iter) + + return r; + } +-EXPORT_SYMBOL(nftnl_rule_list_iter_next); + +-void nftnl_rule_list_iter_destroy(const struct nftnl_rule_list_iter *iter) ++void __EXPORTED nftnl_rule_list_iter_destroy(const struct nftnl_rule_list_iter *iter) + { + xfree(iter); + } +-EXPORT_SYMBOL(nftnl_rule_list_iter_destroy); +diff --git a/src/ruleset.c b/src/ruleset.c +index 6ef2956..10d48f6 100644 +--- a/src/ruleset.c ++++ b/src/ruleset.c +@@ -55,13 +55,12 @@ struct nftnl_parse_ctx { + uint16_t flags; + }; + +-struct nftnl_ruleset *nftnl_ruleset_alloc(void) ++struct nftnl_ruleset __EXPORTED *nftnl_ruleset_alloc(void) + { + return calloc(1, sizeof(struct nftnl_ruleset)); + } +-EXPORT_SYMBOL(nftnl_ruleset_alloc); + +-void nftnl_ruleset_free(const struct nftnl_ruleset *r) ++void __EXPORTED nftnl_ruleset_free(const struct nftnl_ruleset *r) + { + if (r->flags & (1 << NFTNL_RULESET_TABLELIST)) + nftnl_table_list_free(r->table_list); +@@ -73,15 +72,13 @@ void nftnl_ruleset_free(const struct nftnl_ruleset *r) + nftnl_rule_list_free(r->rule_list); + xfree(r); + } +-EXPORT_SYMBOL(nftnl_ruleset_free); + +-bool nftnl_ruleset_is_set(const struct nftnl_ruleset *r, uint16_t attr) ++bool __EXPORTED nftnl_ruleset_is_set(const struct nftnl_ruleset *r, uint16_t attr) + { + return r->flags & (1 << attr); + } +-EXPORT_SYMBOL(nftnl_ruleset_is_set); + +-void nftnl_ruleset_unset(struct nftnl_ruleset *r, uint16_t attr) ++void __EXPORTED nftnl_ruleset_unset(struct nftnl_ruleset *r, uint16_t attr) + { + if (!(r->flags & (1 << attr))) + return; +@@ -102,9 +99,8 @@ void nftnl_ruleset_unset(struct nftnl_ruleset *r, uint16_t attr) + } + r->flags &= ~(1 << attr); + } +-EXPORT_SYMBOL(nftnl_ruleset_unset); + +-void nftnl_ruleset_set(struct nftnl_ruleset *r, uint16_t attr, void *data) ++void __EXPORTED nftnl_ruleset_set(struct nftnl_ruleset *r, uint16_t attr, void *data) + { + switch (attr) { + case NFTNL_RULESET_TABLELIST: +@@ -128,9 +124,8 @@ void nftnl_ruleset_set(struct nftnl_ruleset *r, uint16_t attr, void *data) + } + r->flags |= (1 << attr); + } +-EXPORT_SYMBOL(nftnl_ruleset_set); + +-void *nftnl_ruleset_get(const struct nftnl_ruleset *r, uint16_t attr) ++void __EXPORTED *nftnl_ruleset_get(const struct nftnl_ruleset *r, uint16_t attr) + { + if (!(r->flags & (1 << attr))) + return NULL; +@@ -148,9 +143,8 @@ void *nftnl_ruleset_get(const struct nftnl_ruleset *r, uint16_t attr) + return NULL; + } + } +-EXPORT_SYMBOL(nftnl_ruleset_get); + +-void nftnl_ruleset_ctx_free(const struct nftnl_parse_ctx *ctx) ++void __EXPORTED nftnl_ruleset_ctx_free(const struct nftnl_parse_ctx *ctx) + { + switch (ctx->type) { + case NFTNL_RULESET_TABLE: +@@ -171,15 +165,13 @@ void nftnl_ruleset_ctx_free(const struct nftnl_parse_ctx *ctx) + break; + } + } +-EXPORT_SYMBOL(nftnl_ruleset_ctx_free); + +-bool nftnl_ruleset_ctx_is_set(const struct nftnl_parse_ctx *ctx, uint16_t attr) ++bool __EXPORTED nftnl_ruleset_ctx_is_set(const struct nftnl_parse_ctx *ctx, uint16_t attr) + { + return ctx->flags & (1 << attr); + } +-EXPORT_SYMBOL(nftnl_ruleset_ctx_is_set); + +-void *nftnl_ruleset_ctx_get(const struct nftnl_parse_ctx *ctx, uint16_t attr) ++void __EXPORTED *nftnl_ruleset_ctx_get(const struct nftnl_parse_ctx *ctx, uint16_t attr) + { + if (!(ctx->flags & (1 << attr))) + return NULL; +@@ -203,14 +195,12 @@ void *nftnl_ruleset_ctx_get(const struct nftnl_parse_ctx *ctx, uint16_t attr) + return NULL; + } + } +-EXPORT_SYMBOL(nftnl_ruleset_ctx_get); + +-uint32_t nftnl_ruleset_ctx_get_u32(const struct nftnl_parse_ctx *ctx, uint16_t attr) ++uint32_t __EXPORTED nftnl_ruleset_ctx_get_u32(const struct nftnl_parse_ctx *ctx, uint16_t attr) + { + const void *ret = nftnl_ruleset_ctx_get(ctx, attr); + return ret == NULL ? 0 : *((uint32_t *)ret); + } +-EXPORT_SYMBOL(nftnl_ruleset_ctx_get_u32); + + #if defined(JSON_PARSING) + static void nftnl_ruleset_ctx_set(struct nftnl_parse_ctx *ctx, uint16_t attr, +@@ -593,22 +583,20 @@ nftnl_ruleset_do_parse(enum nftnl_parse_type type, const void *data, + return ret; + } + +-int nftnl_ruleset_parse_file_cb(enum nftnl_parse_type type, FILE *fp, ++int __EXPORTED nftnl_ruleset_parse_file_cb(enum nftnl_parse_type type, FILE *fp, + struct nftnl_parse_err *err, void *data, + int (*cb)(const struct nftnl_parse_ctx *ctx)) + { + return nftnl_ruleset_do_parse(type, fp, err, NFTNL_PARSE_FILE, data, cb); + } +-EXPORT_SYMBOL(nftnl_ruleset_parse_file_cb); + +-int nftnl_ruleset_parse_buffer_cb(enum nftnl_parse_type type, const char *buffer, ++int __EXPORTED nftnl_ruleset_parse_buffer_cb(enum nftnl_parse_type type, const char *buffer, + struct nftnl_parse_err *err, void *data, + int (*cb)(const struct nftnl_parse_ctx *ctx)) + { + return nftnl_ruleset_do_parse(type, buffer, err, NFTNL_PARSE_BUFFER, data, + cb); + } +-EXPORT_SYMBOL(nftnl_ruleset_parse_buffer_cb); + + static int nftnl_ruleset_cb(const struct nftnl_parse_ctx *ctx) + { +@@ -671,19 +659,17 @@ static int nftnl_ruleset_cb(const struct nftnl_parse_ctx *ctx) + return 0; + } + +-int nftnl_ruleset_parse(struct nftnl_ruleset *r, enum nftnl_parse_type type, ++int __EXPORTED nftnl_ruleset_parse(struct nftnl_ruleset *r, enum nftnl_parse_type type, + const char *data, struct nftnl_parse_err *err) + { + return nftnl_ruleset_parse_buffer_cb(type, data, err, r, nftnl_ruleset_cb); + } +-EXPORT_SYMBOL(nftnl_ruleset_parse); + +-int nftnl_ruleset_parse_file(struct nftnl_ruleset *rs, enum nftnl_parse_type type, ++int __EXPORTED nftnl_ruleset_parse_file(struct nftnl_ruleset *rs, enum nftnl_parse_type type, + FILE *fp, struct nftnl_parse_err *err) + { + return nftnl_ruleset_parse_file_cb(type, fp, err, rs, nftnl_ruleset_cb); + } +-EXPORT_SYMBOL(nftnl_ruleset_parse_file); + + static const char *nftnl_ruleset_o_opentag(uint32_t type) + { +@@ -928,7 +914,7 @@ static int nftnl_ruleset_cmd_snprintf(char *buf, size_t size, + } + } + +-int nftnl_ruleset_snprintf(char *buf, size_t size, const struct nftnl_ruleset *r, ++int __EXPORTED nftnl_ruleset_snprintf(char *buf, size_t size, const struct nftnl_ruleset *r, + uint32_t type, uint32_t flags) + { + switch (type) { +@@ -943,7 +929,6 @@ int nftnl_ruleset_snprintf(char *buf, size_t size, const struct nftnl_ruleset *r + return -1; + } + } +-EXPORT_SYMBOL(nftnl_ruleset_snprintf); + + static int nftnl_ruleset_fprintf_tables(FILE *fp, const struct nftnl_ruleset *rs, + uint32_t type, uint32_t flags) +@@ -1157,10 +1142,9 @@ static int nftnl_ruleset_cmd_fprintf(FILE *fp, const struct nftnl_ruleset *rs, + return len; + } + +-int nftnl_ruleset_fprintf(FILE *fp, const struct nftnl_ruleset *rs, uint32_t type, ++int __EXPORTED nftnl_ruleset_fprintf(FILE *fp, const struct nftnl_ruleset *rs, uint32_t type, + uint32_t flags) + { + return nftnl_ruleset_cmd_fprintf(fp, rs, nftnl_flag2cmd(flags), type, + flags); + } +-EXPORT_SYMBOL(nftnl_ruleset_fprintf); +diff --git a/src/set.c b/src/set.c +index cce5e63..33a6794 100644 +--- a/src/set.c ++++ b/src/set.c +@@ -27,7 +27,7 @@ + #include <libnftnl/set.h> + #include <libnftnl/expr.h> + +-struct nftnl_set *nftnl_set_alloc(void) ++struct nftnl_set __EXPORTED *nftnl_set_alloc(void) + { + struct nftnl_set *s; + +@@ -38,9 +38,8 @@ struct nftnl_set *nftnl_set_alloc(void) + INIT_LIST_HEAD(&s->element_list); + return s; + } +-EXPORT_SYMBOL(nftnl_set_alloc); + +-void nftnl_set_free(const struct nftnl_set *s) ++void __EXPORTED nftnl_set_free(const struct nftnl_set *s) + { + struct nftnl_set_elem *elem, *tmp; + +@@ -55,15 +54,13 @@ void nftnl_set_free(const struct nftnl_set *s) + } + xfree(s); + } +-EXPORT_SYMBOL(nftnl_set_free); + +-bool nftnl_set_is_set(const struct nftnl_set *s, uint16_t attr) ++bool __EXPORTED nftnl_set_is_set(const struct nftnl_set *s, uint16_t attr) + { + return s->flags & (1 << attr); + } +-EXPORT_SYMBOL(nftnl_set_is_set); + +-void nftnl_set_unset(struct nftnl_set *s, uint16_t attr) ++void __EXPORTED nftnl_set_unset(struct nftnl_set *s, uint16_t attr) + { + if (!(s->flags & (1 << attr))) + return; +@@ -97,7 +94,6 @@ void nftnl_set_unset(struct nftnl_set *s, uint16_t attr) + + s->flags &= ~(1 << attr); + } +-EXPORT_SYMBOL(nftnl_set_unset); + + static uint32_t nftnl_set_validate[NFTNL_SET_MAX + 1] = { + [NFTNL_SET_FLAGS] = sizeof(uint32_t), +@@ -113,7 +109,7 @@ static uint32_t nftnl_set_validate[NFTNL_SET_MAX + 1] = { + [NFTNL_SET_GC_INTERVAL] = sizeof(uint32_t), + }; + +-int nftnl_set_set_data(struct nftnl_set *s, uint16_t attr, const void *data, ++int __EXPORTED nftnl_set_set_data(struct nftnl_set *s, uint16_t attr, const void *data, + uint32_t data_len) + { + nftnl_assert_attr_exists(attr, NFTNL_SET_MAX); +@@ -186,33 +182,28 @@ int nftnl_set_set_data(struct nftnl_set *s, uint16_t attr, const void *data, + s->flags |= (1 << attr); + return 0; + } +-EXPORT_SYMBOL(nftnl_set_set_data); + +-int nftnl_set_set(struct nftnl_set *s, uint16_t attr, const void *data) ++int __EXPORTED nftnl_set_set(struct nftnl_set *s, uint16_t attr, const void *data) + { + return nftnl_set_set_data(s, attr, data, nftnl_set_validate[attr]); + } +-EXPORT_SYMBOL(nftnl_set_set); + +-void nftnl_set_set_u32(struct nftnl_set *s, uint16_t attr, uint32_t val) ++void __EXPORTED nftnl_set_set_u32(struct nftnl_set *s, uint16_t attr, uint32_t val) + { + nftnl_set_set(s, attr, &val); + } +-EXPORT_SYMBOL(nftnl_set_set_u32); + +-void nftnl_set_set_u64(struct nftnl_set *s, uint16_t attr, uint64_t val) ++void __EXPORTED nftnl_set_set_u64(struct nftnl_set *s, uint16_t attr, uint64_t val) + { + nftnl_set_set(s, attr, &val); + } +-EXPORT_SYMBOL(nftnl_set_set_u64); + +-int nftnl_set_set_str(struct nftnl_set *s, uint16_t attr, const char *str) ++int __EXPORTED nftnl_set_set_str(struct nftnl_set *s, uint16_t attr, const char *str) + { + return nftnl_set_set_data(s, attr, str, strlen(str) + 1); + } +-EXPORT_SYMBOL(nftnl_set_set_str); + +-const void *nftnl_set_get_data(const struct nftnl_set *s, uint16_t attr, ++const void __EXPORTED *nftnl_set_get_data(const struct nftnl_set *s, uint16_t attr, + uint32_t *data_len) + { + if (!(s->flags & (1 << attr))) +@@ -267,22 +258,19 @@ const void *nftnl_set_get_data(const struct nftnl_set *s, uint16_t attr, + } + return NULL; + } +-EXPORT_SYMBOL(nftnl_set_get_data); + +-const void *nftnl_set_get(const struct nftnl_set *s, uint16_t attr) ++const void __EXPORTED *nftnl_set_get(const struct nftnl_set *s, uint16_t attr) + { + uint32_t data_len; + return nftnl_set_get_data(s, attr, &data_len); + } +-EXPORT_SYMBOL(nftnl_set_get); + +-const char *nftnl_set_get_str(const struct nftnl_set *s, uint16_t attr) ++const char __EXPORTED *nftnl_set_get_str(const struct nftnl_set *s, uint16_t attr) + { + return nftnl_set_get(s, attr); + } +-EXPORT_SYMBOL(nftnl_set_get_str); + +-uint32_t nftnl_set_get_u32(const struct nftnl_set *s, uint16_t attr) ++uint32_t __EXPORTED nftnl_set_get_u32(const struct nftnl_set *s, uint16_t attr) + { + uint32_t data_len; + const uint32_t *val = nftnl_set_get_data(s, attr, &data_len); +@@ -291,9 +279,8 @@ uint32_t nftnl_set_get_u32(const struct nftnl_set *s, uint16_t attr) + + return val ? *val : 0; + } +-EXPORT_SYMBOL(nftnl_set_get_u32); + +-uint64_t nftnl_set_get_u64(const struct nftnl_set *s, uint16_t attr) ++uint64_t __EXPORTED nftnl_set_get_u64(const struct nftnl_set *s, uint16_t attr) + { + uint32_t data_len; + const uint64_t *val = nftnl_set_get_data(s, attr, &data_len); +@@ -302,7 +289,6 @@ uint64_t nftnl_set_get_u64(const struct nftnl_set *s, uint16_t attr) + + return val ? *val : 0; + } +-EXPORT_SYMBOL(nftnl_set_get_u64); + + struct nftnl_set *nftnl_set_clone(const struct nftnl_set *set) + { +@@ -351,7 +337,7 @@ nftnl_set_nlmsg_build_desc_payload(struct nlmsghdr *nlh, struct nftnl_set *s) + mnl_attr_nest_end(nlh, nest); + } + +-void nftnl_set_nlmsg_build_payload(struct nlmsghdr *nlh, struct nftnl_set *s) ++void __EXPORTED nftnl_set_nlmsg_build_payload(struct nlmsghdr *nlh, struct nftnl_set *s) + { + if (s->flags & (1 << NFTNL_SET_TABLE)) + mnl_attr_put_strz(nlh, NFTA_SET_TABLE, s->table); +@@ -383,7 +369,6 @@ void nftnl_set_nlmsg_build_payload(struct nlmsghdr *nlh, struct nftnl_set *s) + if (s->flags & (1 << NFTNL_SET_USERDATA)) + mnl_attr_put(nlh, NFTA_SET_USERDATA, s->user.len, s->user.data); + } +-EXPORT_SYMBOL(nftnl_set_nlmsg_build_payload); + + static int nftnl_set_parse_attr_cb(const struct nlattr *attr, void *data) + { +@@ -463,7 +448,7 @@ static int nftnl_set_desc_parse(struct nftnl_set *s, + return 0; + } + +-int nftnl_set_nlmsg_parse(const struct nlmsghdr *nlh, struct nftnl_set *s) ++int __EXPORTED nftnl_set_nlmsg_parse(const struct nlmsghdr *nlh, struct nftnl_set *s) + { + struct nlattr *tb[NFTA_SET_MAX+1] = {}; + struct nfgenmsg *nfg = mnl_nlmsg_get_payload(nlh); +@@ -546,7 +531,6 @@ int nftnl_set_nlmsg_parse(const struct nlmsghdr *nlh, struct nftnl_set *s) + + return 0; + } +-EXPORT_SYMBOL(nftnl_set_nlmsg_parse); + + #ifdef JSON_PARSING + static int nftnl_jansson_parse_set_info(struct nftnl_set *s, json_t *tree, +@@ -718,19 +702,17 @@ static int nftnl_set_do_parse(struct nftnl_set *s, enum nftnl_parse_type type, + + return ret; + } +-int nftnl_set_parse(struct nftnl_set *s, enum nftnl_parse_type type, ++int __EXPORTED nftnl_set_parse(struct nftnl_set *s, enum nftnl_parse_type type, + const char *data, struct nftnl_parse_err *err) + { + return nftnl_set_do_parse(s, type, data, err, NFTNL_PARSE_BUFFER); + } +-EXPORT_SYMBOL(nftnl_set_parse); + +-int nftnl_set_parse_file(struct nftnl_set *s, enum nftnl_parse_type type, ++int __EXPORTED nftnl_set_parse_file(struct nftnl_set *s, enum nftnl_parse_type type, + FILE *fp, struct nftnl_parse_err *err) + { + return nftnl_set_do_parse(s, type, fp, err, NFTNL_PARSE_FILE); + } +-EXPORT_SYMBOL(nftnl_set_parse_file); + + static int nftnl_set_snprintf_json(char *buf, size_t size, + const struct nftnl_set *s, +@@ -918,13 +900,12 @@ static int nftnl_set_cmd_snprintf(char *buf, size_t size, + return offset; + } + +-int nftnl_set_snprintf(char *buf, size_t size, const struct nftnl_set *s, ++int __EXPORTED nftnl_set_snprintf(char *buf, size_t size, const struct nftnl_set *s, + uint32_t type, uint32_t flags) + { + return nftnl_set_cmd_snprintf(buf, size, s, nftnl_flag2cmd(flags), type, + flags); + } +-EXPORT_SYMBOL(nftnl_set_snprintf); + + static int nftnl_set_do_snprintf(char *buf, size_t size, const void *s, + uint32_t cmd, uint32_t type, uint32_t flags) +@@ -932,25 +913,23 @@ static int nftnl_set_do_snprintf(char *buf, size_t size, const void *s, + return nftnl_set_snprintf(buf, size, s, type, flags); + } + +-int nftnl_set_fprintf(FILE *fp, const struct nftnl_set *s, uint32_t type, ++int __EXPORTED nftnl_set_fprintf(FILE *fp, const struct nftnl_set *s, uint32_t type, + uint32_t flags) + { + return nftnl_fprintf(fp, s, NFTNL_CMD_UNSPEC, type, flags, + nftnl_set_do_snprintf); + } +-EXPORT_SYMBOL(nftnl_set_fprintf); + +-void nftnl_set_elem_add(struct nftnl_set *s, struct nftnl_set_elem *elem) ++void __EXPORTED nftnl_set_elem_add(struct nftnl_set *s, struct nftnl_set_elem *elem) + { + list_add_tail(&elem->head, &s->element_list); + } +-EXPORT_SYMBOL(nftnl_set_elem_add); + + struct nftnl_set_list { + struct list_head list; + }; + +-struct nftnl_set_list *nftnl_set_list_alloc(void) ++struct nftnl_set_list __EXPORTED *nftnl_set_list_alloc(void) + { + struct nftnl_set_list *list; + +@@ -962,9 +941,8 @@ struct nftnl_set_list *nftnl_set_list_alloc(void) + + return list; + } +-EXPORT_SYMBOL(nftnl_set_list_alloc); + +-void nftnl_set_list_free(struct nftnl_set_list *list) ++void __EXPORTED nftnl_set_list_free(struct nftnl_set_list *list) + { + struct nftnl_set *s, *tmp; + +@@ -974,33 +952,28 @@ void nftnl_set_list_free(struct nftnl_set_list *list) + } + xfree(list); + } +-EXPORT_SYMBOL(nftnl_set_list_free); + +-int nftnl_set_list_is_empty(const struct nftnl_set_list *list) ++int __EXPORTED nftnl_set_list_is_empty(const struct nftnl_set_list *list) + { + return list_empty(&list->list); + } +-EXPORT_SYMBOL(nftnl_set_list_is_empty); + +-void nftnl_set_list_add(struct nftnl_set *s, struct nftnl_set_list *list) ++void __EXPORTED nftnl_set_list_add(struct nftnl_set *s, struct nftnl_set_list *list) + { + list_add(&s->head, &list->list); + } +-EXPORT_SYMBOL(nftnl_set_list_add); + +-void nftnl_set_list_add_tail(struct nftnl_set *s, struct nftnl_set_list *list) ++void __EXPORTED nftnl_set_list_add_tail(struct nftnl_set *s, struct nftnl_set_list *list) + { + list_add_tail(&s->head, &list->list); + } +-EXPORT_SYMBOL(nftnl_set_list_add_tail); + +-void nftnl_set_list_del(struct nftnl_set *s) ++void __EXPORTED nftnl_set_list_del(struct nftnl_set *s) + { + list_del(&s->head); + } +-EXPORT_SYMBOL(nftnl_set_list_del); + +-int nftnl_set_list_foreach(struct nftnl_set_list *set_list, ++int __EXPORTED nftnl_set_list_foreach(struct nftnl_set_list *set_list, + int (*cb)(struct nftnl_set *t, void *data), void *data) + { + struct nftnl_set *cur, *tmp; +@@ -1013,14 +986,13 @@ int nftnl_set_list_foreach(struct nftnl_set_list *set_list, + } + return 0; + } +-EXPORT_SYMBOL(nftnl_set_list_foreach); + + struct nftnl_set_list_iter { + const struct nftnl_set_list *list; + struct nftnl_set *cur; + }; + +-struct nftnl_set_list_iter * ++struct nftnl_set_list_iter __EXPORTED * + nftnl_set_list_iter_create(const struct nftnl_set_list *l) + { + struct nftnl_set_list_iter *iter; +@@ -1037,16 +1009,14 @@ nftnl_set_list_iter_create(const struct nftnl_set_list *l) + + return iter; + } +-EXPORT_SYMBOL(nftnl_set_list_iter_create); + +-struct nftnl_set * ++struct nftnl_set __EXPORTED * + nftnl_set_list_iter_cur(const struct nftnl_set_list_iter *iter) + { + return iter->cur; + } +-EXPORT_SYMBOL(nftnl_set_list_iter_cur); + +-struct nftnl_set *nftnl_set_list_iter_next(struct nftnl_set_list_iter *iter) ++struct nftnl_set __EXPORTED *nftnl_set_list_iter_next(struct nftnl_set_list_iter *iter) + { + struct nftnl_set *s = iter->cur; + +@@ -1060,13 +1030,11 @@ struct nftnl_set *nftnl_set_list_iter_next(struct nftnl_set_list_iter *iter) + + return s; + } +-EXPORT_SYMBOL(nftnl_set_list_iter_next); + +-void nftnl_set_list_iter_destroy(const struct nftnl_set_list_iter *iter) ++void __EXPORTED nftnl_set_list_iter_destroy(const struct nftnl_set_list_iter *iter) + { + xfree(iter); + } +-EXPORT_SYMBOL(nftnl_set_list_iter_destroy); + + static struct nftnl_set *nftnl_set_lookup(const char *this_set_name, + struct nftnl_set_list *set_list) +diff --git a/src/set_elem.c b/src/set_elem.c +index 433b896..bd1e895 100644 +--- a/src/set_elem.c ++++ b/src/set_elem.c +@@ -27,7 +27,7 @@ + #include <libnftnl/rule.h> + #include <libnftnl/expr.h> + +-struct nftnl_set_elem *nftnl_set_elem_alloc(void) ++struct nftnl_set_elem __EXPORTED *nftnl_set_elem_alloc(void) + { + struct nftnl_set_elem *s; + +@@ -37,9 +37,8 @@ struct nftnl_set_elem *nftnl_set_elem_alloc(void) + + return s; + } +-EXPORT_SYMBOL(nftnl_set_elem_alloc); + +-void nftnl_set_elem_free(struct nftnl_set_elem *s) ++void __EXPORTED nftnl_set_elem_free(struct nftnl_set_elem *s) + { + if (s->flags & (1 << NFTNL_SET_ELEM_CHAIN)) + xfree(s->data.chain); +@@ -55,15 +54,13 @@ void nftnl_set_elem_free(struct nftnl_set_elem *s) + + xfree(s); + } +-EXPORT_SYMBOL(nftnl_set_elem_free); + +-bool nftnl_set_elem_is_set(const struct nftnl_set_elem *s, uint16_t attr) ++bool __EXPORTED nftnl_set_elem_is_set(const struct nftnl_set_elem *s, uint16_t attr) + { + return s->flags & (1 << attr); + } +-EXPORT_SYMBOL(nftnl_set_elem_is_set); + +-void nftnl_set_elem_unset(struct nftnl_set_elem *s, uint16_t attr) ++void __EXPORTED nftnl_set_elem_unset(struct nftnl_set_elem *s, uint16_t attr) + { + if (!(s->flags & (1 << attr))) + return; +@@ -94,9 +91,8 @@ void nftnl_set_elem_unset(struct nftnl_set_elem *s, uint16_t attr) + + s->flags &= ~(1 << attr); + } +-EXPORT_SYMBOL(nftnl_set_elem_unset); + +-int nftnl_set_elem_set(struct nftnl_set_elem *s, uint16_t attr, ++int __EXPORTED nftnl_set_elem_set(struct nftnl_set_elem *s, uint16_t attr, + const void *data, uint32_t data_len) + { + switch(attr) { +@@ -147,27 +143,23 @@ int nftnl_set_elem_set(struct nftnl_set_elem *s, uint16_t attr, + s->flags |= (1 << attr); + return -1; + } +-EXPORT_SYMBOL(nftnl_set_elem_set); + +-void nftnl_set_elem_set_u32(struct nftnl_set_elem *s, uint16_t attr, uint32_t val) ++void __EXPORTED nftnl_set_elem_set_u32(struct nftnl_set_elem *s, uint16_t attr, uint32_t val) + { + nftnl_set_elem_set(s, attr, &val, sizeof(uint32_t)); + } +-EXPORT_SYMBOL(nftnl_set_elem_set_u32); + +-void nftnl_set_elem_set_u64(struct nftnl_set_elem *s, uint16_t attr, uint64_t val) ++void __EXPORTED nftnl_set_elem_set_u64(struct nftnl_set_elem *s, uint16_t attr, uint64_t val) + { + nftnl_set_elem_set(s, attr, &val, sizeof(uint64_t)); + } +-EXPORT_SYMBOL(nftnl_set_elem_set_u64); + +-int nftnl_set_elem_set_str(struct nftnl_set_elem *s, uint16_t attr, const char *str) ++int __EXPORTED nftnl_set_elem_set_str(struct nftnl_set_elem *s, uint16_t attr, const char *str) + { + return nftnl_set_elem_set(s, attr, str, strlen(str) + 1); + } +-EXPORT_SYMBOL(nftnl_set_elem_set_str); + +-const void *nftnl_set_elem_get(struct nftnl_set_elem *s, uint16_t attr, uint32_t *data_len) ++const void __EXPORTED *nftnl_set_elem_get(struct nftnl_set_elem *s, uint16_t attr, uint32_t *data_len) + { + if (!(s->flags & (1 << attr))) + return NULL; +@@ -205,31 +197,27 @@ const void *nftnl_set_elem_get(struct nftnl_set_elem *s, uint16_t attr, uint32_t + } + return NULL; + } +-EXPORT_SYMBOL(nftnl_set_elem_get); + +-const char *nftnl_set_elem_get_str(struct nftnl_set_elem *s, uint16_t attr) ++const char __EXPORTED *nftnl_set_elem_get_str(struct nftnl_set_elem *s, uint16_t attr) + { + uint32_t size; + + return nftnl_set_elem_get(s, attr, &size); + } +-EXPORT_SYMBOL(nftnl_set_elem_get_str); + +-uint32_t nftnl_set_elem_get_u32(struct nftnl_set_elem *s, uint16_t attr) ++uint32_t __EXPORTED nftnl_set_elem_get_u32(struct nftnl_set_elem *s, uint16_t attr) + { + uint32_t size; + uint32_t val = *((uint32_t *)nftnl_set_elem_get(s, attr, &size)); + return val; + } +-EXPORT_SYMBOL(nftnl_set_elem_get_u32); + +-uint64_t nftnl_set_elem_get_u64(struct nftnl_set_elem *s, uint16_t attr) ++uint64_t __EXPORTED nftnl_set_elem_get_u64(struct nftnl_set_elem *s, uint16_t attr) + { + uint32_t size; + uint64_t val = *((uint64_t *)nftnl_set_elem_get(s, attr, &size)); + return val; + } +-EXPORT_SYMBOL(nftnl_set_elem_get_u64); + + struct nftnl_set_elem *nftnl_set_elem_clone(struct nftnl_set_elem *elem) + { +@@ -315,7 +303,7 @@ static struct nlattr *nftnl_set_elem_build(struct nlmsghdr *nlh, + return nest2; + } + +-void nftnl_set_elems_nlmsg_build_payload(struct nlmsghdr *nlh, struct nftnl_set *s) ++void __EXPORTED nftnl_set_elems_nlmsg_build_payload(struct nlmsghdr *nlh, struct nftnl_set *s) + { + struct nftnl_set_elem *elem; + struct nlattr *nest1; +@@ -332,7 +320,6 @@ void nftnl_set_elems_nlmsg_build_payload(struct nlmsghdr *nlh, struct nftnl_set + + mnl_attr_nest_end(nlh, nest1); + } +-EXPORT_SYMBOL(nftnl_set_elems_nlmsg_build_payload); + + static int nftnl_set_elem_parse_attr_cb(const struct nlattr *attr, void *data) + { +@@ -503,7 +490,7 @@ static int nftnl_set_elems_parse(struct nftnl_set *s, const struct nlattr *nest) + return ret; + } + +-int nftnl_set_elems_nlmsg_parse(const struct nlmsghdr *nlh, struct nftnl_set *s) ++int __EXPORTED nftnl_set_elems_nlmsg_parse(const struct nlmsghdr *nlh, struct nftnl_set *s) + { + struct nlattr *tb[NFTA_SET_ELEM_LIST_MAX+1] = {}; + struct nfgenmsg *nfg = mnl_nlmsg_get_payload(nlh); +@@ -546,7 +533,6 @@ int nftnl_set_elems_nlmsg_parse(const struct nlmsghdr *nlh, struct nftnl_set *s) + + return 0; + } +-EXPORT_SYMBOL(nftnl_set_elems_nlmsg_parse); + + static int nftnl_set_elem_json_parse(struct nftnl_set_elem *e, const void *json, + struct nftnl_parse_err *err, +@@ -587,19 +573,17 @@ nftnl_set_elem_do_parse(struct nftnl_set_elem *e, enum nftnl_parse_type type, + + return ret; + } +-int nftnl_set_elem_parse(struct nftnl_set_elem *e, enum nftnl_parse_type type, ++int __EXPORTED nftnl_set_elem_parse(struct nftnl_set_elem *e, enum nftnl_parse_type type, + const char *data, struct nftnl_parse_err *err) + { + return nftnl_set_elem_do_parse(e, type, data, err, NFTNL_PARSE_BUFFER); + } +-EXPORT_SYMBOL(nftnl_set_elem_parse); + +-int nftnl_set_elem_parse_file(struct nftnl_set_elem *e, enum nftnl_parse_type type, ++int __EXPORTED nftnl_set_elem_parse_file(struct nftnl_set_elem *e, enum nftnl_parse_type type, + FILE *fp, struct nftnl_parse_err *err) + { + return nftnl_set_elem_do_parse(e, type, fp, err, NFTNL_PARSE_FILE); + } +-EXPORT_SYMBOL(nftnl_set_elem_parse_file); + + static int nftnl_set_elem_snprintf_json(char *buf, size_t size, + const struct nftnl_set_elem *e, +@@ -719,14 +703,13 @@ static int nftnl_set_elem_cmd_snprintf(char *buf, size_t size, + return offset; + } + +-int nftnl_set_elem_snprintf(char *buf, size_t size, ++int __EXPORTED nftnl_set_elem_snprintf(char *buf, size_t size, + const struct nftnl_set_elem *e, + uint32_t type, uint32_t flags) + { + return nftnl_set_elem_cmd_snprintf(buf, size, e, nftnl_flag2cmd(flags), + type, flags); + } +-EXPORT_SYMBOL(nftnl_set_elem_snprintf); + + static int nftnl_set_elem_do_snprintf(char *buf, size_t size, const void *e, + uint32_t cmd, uint32_t type, +@@ -735,15 +718,14 @@ static int nftnl_set_elem_do_snprintf(char *buf, size_t size, const void *e, + return nftnl_set_elem_snprintf(buf, size, e, type, flags); + } + +-int nftnl_set_elem_fprintf(FILE *fp, struct nftnl_set_elem *se, uint32_t type, ++int __EXPORTED nftnl_set_elem_fprintf(FILE *fp, struct nftnl_set_elem *se, uint32_t type, + uint32_t flags) + { + return nftnl_fprintf(fp, se, NFTNL_CMD_UNSPEC, type, flags, + nftnl_set_elem_do_snprintf); + } +-EXPORT_SYMBOL(nftnl_set_elem_fprintf); + +-int nftnl_set_elem_foreach(struct nftnl_set *s, ++int __EXPORTED nftnl_set_elem_foreach(struct nftnl_set *s, + int (*cb)(struct nftnl_set_elem *e, void *data), + void *data) + { +@@ -757,7 +739,6 @@ int nftnl_set_elem_foreach(struct nftnl_set *s, + } + return 0; + } +-EXPORT_SYMBOL(nftnl_set_elem_foreach); + + struct nftnl_set_elems_iter { + const struct nftnl_set *set; +@@ -765,7 +746,7 @@ struct nftnl_set_elems_iter { + struct nftnl_set_elem *cur; + }; + +-struct nftnl_set_elems_iter * ++struct nftnl_set_elems_iter __EXPORTED * + nftnl_set_elems_iter_create(const struct nftnl_set *s) + { + struct nftnl_set_elems_iter *iter; +@@ -784,16 +765,14 @@ nftnl_set_elems_iter_create(const struct nftnl_set *s) + + return iter; + } +-EXPORT_SYMBOL(nftnl_set_elems_iter_create); + +-struct nftnl_set_elem * ++struct nftnl_set_elem __EXPORTED * + nftnl_set_elems_iter_cur(const struct nftnl_set_elems_iter *iter) + { + return iter->cur; + } +-EXPORT_SYMBOL(nftnl_set_elems_iter_cur); + +-struct nftnl_set_elem *nftnl_set_elems_iter_next(struct nftnl_set_elems_iter *iter) ++struct nftnl_set_elem __EXPORTED *nftnl_set_elems_iter_next(struct nftnl_set_elems_iter *iter) + { + struct nftnl_set_elem *s = iter->cur; + +@@ -806,13 +785,11 @@ struct nftnl_set_elem *nftnl_set_elems_iter_next(struct nftnl_set_elems_iter *it + + return s; + } +-EXPORT_SYMBOL(nftnl_set_elems_iter_next); + +-void nftnl_set_elems_iter_destroy(struct nftnl_set_elems_iter *iter) ++void __EXPORTED nftnl_set_elems_iter_destroy(struct nftnl_set_elems_iter *iter) + { + xfree(iter); + } +-EXPORT_SYMBOL(nftnl_set_elems_iter_destroy); + + static bool nftnl_attr_nest_overflow(struct nlmsghdr *nlh, + const struct nlattr *from, +@@ -831,7 +808,7 @@ static bool nftnl_attr_nest_overflow(struct nlmsghdr *nlh, + return false; + } + +-int nftnl_set_elems_nlmsg_build_payload_iter(struct nlmsghdr *nlh, ++int __EXPORTED nftnl_set_elems_nlmsg_build_payload_iter(struct nlmsghdr *nlh, + struct nftnl_set_elems_iter *iter) + { + struct nftnl_set_elem *elem; +@@ -861,4 +838,3 @@ int nftnl_set_elems_nlmsg_build_payload_iter(struct nlmsghdr *nlh, + + return ret; + } +-EXPORT_SYMBOL(nftnl_set_elems_nlmsg_build_payload_iter); +diff --git a/src/table.c b/src/table.c +index a7d5a8f..0e99f3c 100644 +--- a/src/table.c ++++ b/src/table.c +@@ -36,28 +36,25 @@ struct nftnl_table { + uint32_t flags; + }; + +-struct nftnl_table *nftnl_table_alloc(void) ++struct nftnl_table __EXPORTED *nftnl_table_alloc(void) + { + return calloc(1, sizeof(struct nftnl_table)); + } +-EXPORT_SYMBOL(nftnl_table_alloc); + +-void nftnl_table_free(const struct nftnl_table *t) ++void __EXPORTED nftnl_table_free(const struct nftnl_table *t) + { + if (t->flags & (1 << NFTNL_TABLE_NAME)) + xfree(t->name); + + xfree(t); + } +-EXPORT_SYMBOL(nftnl_table_free); + +-bool nftnl_table_is_set(const struct nftnl_table *t, uint16_t attr) ++bool __EXPORTED nftnl_table_is_set(const struct nftnl_table *t, uint16_t attr) + { + return t->flags & (1 << attr); + } +-EXPORT_SYMBOL(nftnl_table_is_set); + +-void nftnl_table_unset(struct nftnl_table *t, uint16_t attr) ++void __EXPORTED nftnl_table_unset(struct nftnl_table *t, uint16_t attr) + { + if (!(t->flags & (1 << attr))) + return; +@@ -74,14 +71,13 @@ void nftnl_table_unset(struct nftnl_table *t, uint16_t attr) + } + t->flags &= ~(1 << attr); + } +-EXPORT_SYMBOL(nftnl_table_unset); + + static uint32_t nftnl_table_validate[NFTNL_TABLE_MAX + 1] = { + [NFTNL_TABLE_FLAGS] = sizeof(uint32_t), + [NFTNL_TABLE_FAMILY] = sizeof(uint32_t), + }; + +-int nftnl_table_set_data(struct nftnl_table *t, uint16_t attr, ++int __EXPORTED nftnl_table_set_data(struct nftnl_table *t, uint16_t attr, + const void *data, uint32_t data_len) + { + nftnl_assert_attr_exists(attr, NFTNL_TABLE_MAX); +@@ -109,33 +105,28 @@ int nftnl_table_set_data(struct nftnl_table *t, uint16_t attr, + t->flags |= (1 << attr); + return 0; + } +-EXPORT_SYMBOL(nftnl_table_set_data); + +-void nftnl_table_set(struct nftnl_table *t, uint16_t attr, const void *data) ++void __EXPORTED nftnl_table_set(struct nftnl_table *t, uint16_t attr, const void *data) + { + nftnl_table_set_data(t, attr, data, nftnl_table_validate[attr]); + } +-EXPORT_SYMBOL(nftnl_table_set); + +-void nftnl_table_set_u32(struct nftnl_table *t, uint16_t attr, uint32_t val) ++void __EXPORTED nftnl_table_set_u32(struct nftnl_table *t, uint16_t attr, uint32_t val) + { + nftnl_table_set_data(t, attr, &val, sizeof(uint32_t)); + } +-EXPORT_SYMBOL(nftnl_table_set_u32); + +-void nftnl_table_set_u8(struct nftnl_table *t, uint16_t attr, uint8_t val) ++void __EXPORTED nftnl_table_set_u8(struct nftnl_table *t, uint16_t attr, uint8_t val) + { + nftnl_table_set_data(t, attr, &val, sizeof(uint8_t)); + } +-EXPORT_SYMBOL(nftnl_table_set_u8); + +-int nftnl_table_set_str(struct nftnl_table *t, uint16_t attr, const char *str) ++int __EXPORTED nftnl_table_set_str(struct nftnl_table *t, uint16_t attr, const char *str) + { + return nftnl_table_set_data(t, attr, str, strlen(str) + 1); + } +-EXPORT_SYMBOL(nftnl_table_set_str); + +-const void *nftnl_table_get_data(const struct nftnl_table *t, uint16_t attr, ++const void __EXPORTED *nftnl_table_get_data(const struct nftnl_table *t, uint16_t attr, + uint32_t *data_len) + { + if (!(t->flags & (1 << attr))) +@@ -157,43 +148,37 @@ const void *nftnl_table_get_data(const struct nftnl_table *t, uint16_t attr, + } + return NULL; + } +-EXPORT_SYMBOL(nftnl_table_get_data); + +-const void *nftnl_table_get(const struct nftnl_table *t, uint16_t attr) ++const void __EXPORTED *nftnl_table_get(const struct nftnl_table *t, uint16_t attr) + { + uint32_t data_len; + return nftnl_table_get_data(t, attr, &data_len); + } +-EXPORT_SYMBOL(nftnl_table_get); + +-uint32_t nftnl_table_get_u32(const struct nftnl_table *t, uint16_t attr) ++uint32_t __EXPORTED nftnl_table_get_u32(const struct nftnl_table *t, uint16_t attr) + { + const void *ret = nftnl_table_get(t, attr); + return ret == NULL ? 0 : *((uint32_t *)ret); + } +-EXPORT_SYMBOL(nftnl_table_get_u32); + +-uint8_t nftnl_table_get_u8(const struct nftnl_table *t, uint16_t attr) ++uint8_t __EXPORTED nftnl_table_get_u8(const struct nftnl_table *t, uint16_t attr) + { + const void *ret = nftnl_table_get(t, attr); + return ret == NULL ? 0 : *((uint8_t *)ret); + } +-EXPORT_SYMBOL(nftnl_table_get_u8); + +-const char *nftnl_table_get_str(const struct nftnl_table *t, uint16_t attr) ++const char __EXPORTED *nftnl_table_get_str(const struct nftnl_table *t, uint16_t attr) + { + return nftnl_table_get(t, attr); + } +-EXPORT_SYMBOL(nftnl_table_get_str); + +-void nftnl_table_nlmsg_build_payload(struct nlmsghdr *nlh, const struct nftnl_table *t) ++void __EXPORTED nftnl_table_nlmsg_build_payload(struct nlmsghdr *nlh, const struct nftnl_table *t) + { + if (t->flags & (1 << NFTNL_TABLE_NAME)) + mnl_attr_put_strz(nlh, NFTA_TABLE_NAME, t->name); + if (t->flags & (1 << NFTNL_TABLE_FLAGS)) + mnl_attr_put_u32(nlh, NFTA_TABLE_FLAGS, htonl(t->table_flags)); + } +-EXPORT_SYMBOL(nftnl_table_nlmsg_build_payload); + + static int nftnl_table_parse_attr_cb(const struct nlattr *attr, void *data) + { +@@ -219,7 +204,7 @@ static int nftnl_table_parse_attr_cb(const struct nlattr *attr, void *data) + return MNL_CB_OK; + } + +-int nftnl_table_nlmsg_parse(const struct nlmsghdr *nlh, struct nftnl_table *t) ++int __EXPORTED nftnl_table_nlmsg_parse(const struct nlmsghdr *nlh, struct nftnl_table *t) + { + struct nlattr *tb[NFTA_TABLE_MAX+1] = {}; + struct nfgenmsg *nfg = mnl_nlmsg_get_payload(nlh); +@@ -249,7 +234,6 @@ int nftnl_table_nlmsg_parse(const struct nlmsghdr *nlh, struct nftnl_table *t) + + return 0; + } +-EXPORT_SYMBOL(nftnl_table_nlmsg_parse); + + #ifdef JSON_PARSING + int nftnl_jansson_parse_table(struct nftnl_table *t, json_t *tree, +@@ -330,19 +314,17 @@ static int nftnl_table_do_parse(struct nftnl_table *t, enum nftnl_parse_type typ + return ret; + } + +-int nftnl_table_parse(struct nftnl_table *t, enum nftnl_parse_type type, ++int __EXPORTED nftnl_table_parse(struct nftnl_table *t, enum nftnl_parse_type type, + const char *data, struct nftnl_parse_err *err) + { + return nftnl_table_do_parse(t, type, data, err, NFTNL_PARSE_BUFFER); + } +-EXPORT_SYMBOL(nftnl_table_parse); + +-int nftnl_table_parse_file(struct nftnl_table *t, enum nftnl_parse_type type, ++int __EXPORTED nftnl_table_parse_file(struct nftnl_table *t, enum nftnl_parse_type type, + FILE *fp, struct nftnl_parse_err *err) + { + return nftnl_table_do_parse(t, type, fp, err, NFTNL_PARSE_FILE); + } +-EXPORT_SYMBOL(nftnl_table_parse_file); + + static int nftnl_table_export(char *buf, size_t size, + const struct nftnl_table *t, int type) +@@ -400,13 +382,12 @@ static int nftnl_table_cmd_snprintf(char *buf, size_t size, + return offset; + } + +-int nftnl_table_snprintf(char *buf, size_t size, const struct nftnl_table *t, ++int __EXPORTED nftnl_table_snprintf(char *buf, size_t size, const struct nftnl_table *t, + uint32_t type, uint32_t flags) + { + return nftnl_table_cmd_snprintf(buf, size, t, nftnl_flag2cmd(flags), type, + flags); + } +-EXPORT_SYMBOL(nftnl_table_snprintf); + + static int nftnl_table_do_snprintf(char *buf, size_t size, const void *t, + uint32_t cmd, uint32_t type, uint32_t flags) +@@ -414,19 +395,18 @@ static int nftnl_table_do_snprintf(char *buf, size_t size, const void *t, + return nftnl_table_snprintf(buf, size, t, type, flags); + } + +-int nftnl_table_fprintf(FILE *fp, const struct nftnl_table *t, uint32_t type, ++int __EXPORTED nftnl_table_fprintf(FILE *fp, const struct nftnl_table *t, uint32_t type, + uint32_t flags) + { + return nftnl_fprintf(fp, t, NFTNL_CMD_UNSPEC, type, flags, + nftnl_table_do_snprintf); + } +-EXPORT_SYMBOL(nftnl_table_fprintf); + + struct nftnl_table_list { + struct list_head list; + }; + +-struct nftnl_table_list *nftnl_table_list_alloc(void) ++struct nftnl_table_list __EXPORTED *nftnl_table_list_alloc(void) + { + struct nftnl_table_list *list; + +@@ -438,9 +418,8 @@ struct nftnl_table_list *nftnl_table_list_alloc(void) + + return list; + } +-EXPORT_SYMBOL(nftnl_table_list_alloc); + +-void nftnl_table_list_free(struct nftnl_table_list *list) ++void __EXPORTED nftnl_table_list_free(struct nftnl_table_list *list) + { + struct nftnl_table *r, *tmp; + +@@ -450,33 +429,28 @@ void nftnl_table_list_free(struct nftnl_table_list *list) + } + xfree(list); + } +-EXPORT_SYMBOL(nftnl_table_list_free); + +-int nftnl_table_list_is_empty(const struct nftnl_table_list *list) ++int __EXPORTED nftnl_table_list_is_empty(const struct nftnl_table_list *list) + { + return list_empty(&list->list); + } +-EXPORT_SYMBOL(nftnl_table_list_is_empty); + +-void nftnl_table_list_add(struct nftnl_table *r, struct nftnl_table_list *list) ++void __EXPORTED nftnl_table_list_add(struct nftnl_table *r, struct nftnl_table_list *list) + { + list_add(&r->head, &list->list); + } +-EXPORT_SYMBOL(nftnl_table_list_add); + +-void nftnl_table_list_add_tail(struct nftnl_table *r, struct nftnl_table_list *list) ++void __EXPORTED nftnl_table_list_add_tail(struct nftnl_table *r, struct nftnl_table_list *list) + { + list_add_tail(&r->head, &list->list); + } +-EXPORT_SYMBOL(nftnl_table_list_add_tail); + +-void nftnl_table_list_del(struct nftnl_table *t) ++void __EXPORTED nftnl_table_list_del(struct nftnl_table *t) + { + list_del(&t->head); + } +-EXPORT_SYMBOL(nftnl_table_list_del); + +-int nftnl_table_list_foreach(struct nftnl_table_list *table_list, ++int __EXPORTED nftnl_table_list_foreach(struct nftnl_table_list *table_list, + int (*cb)(struct nftnl_table *t, void *data), + void *data) + { +@@ -490,14 +464,13 @@ int nftnl_table_list_foreach(struct nftnl_table_list *table_list, + } + return 0; + } +-EXPORT_SYMBOL(nftnl_table_list_foreach); + + struct nftnl_table_list_iter { + const struct nftnl_table_list *list; + struct nftnl_table *cur; + }; + +-struct nftnl_table_list_iter * ++struct nftnl_table_list_iter __EXPORTED * + nftnl_table_list_iter_create(const struct nftnl_table_list *l) + { + struct nftnl_table_list_iter *iter; +@@ -514,9 +487,8 @@ nftnl_table_list_iter_create(const struct nftnl_table_list *l) + + return iter; + } +-EXPORT_SYMBOL(nftnl_table_list_iter_create); + +-struct nftnl_table *nftnl_table_list_iter_next(struct nftnl_table_list_iter *iter) ++struct nftnl_table __EXPORTED *nftnl_table_list_iter_next(struct nftnl_table_list_iter *iter) + { + struct nftnl_table *r = iter->cur; + +@@ -530,10 +502,8 @@ struct nftnl_table *nftnl_table_list_iter_next(struct nftnl_table_list_iter *ite + + return r; + } +-EXPORT_SYMBOL(nftnl_table_list_iter_next); + +-void nftnl_table_list_iter_destroy(const struct nftnl_table_list_iter *iter) ++void __EXPORTED nftnl_table_list_iter_destroy(const struct nftnl_table_list_iter *iter) + { + xfree(iter); + } +-EXPORT_SYMBOL(nftnl_table_list_iter_destroy); +diff --git a/src/trace.c b/src/trace.c +index bd05d3c..4739ef9 100644 +--- a/src/trace.c ++++ b/src/trace.c +@@ -52,14 +52,12 @@ struct nftnl_trace { + uint32_t flags; + }; + +-EXPORT_SYMBOL(nftnl_trace_alloc); +-struct nftnl_trace *nftnl_trace_alloc(void) ++struct nftnl_trace __EXPORTED *nftnl_trace_alloc(void) + { + return calloc(1, sizeof(struct nftnl_trace)); + } + +-EXPORT_SYMBOL(nftnl_trace_free); +-void nftnl_trace_free(const struct nftnl_trace *t) ++void __EXPORTED nftnl_trace_free(const struct nftnl_trace *t) + { + xfree(t->chain); + xfree(t->table); +@@ -70,8 +68,7 @@ void nftnl_trace_free(const struct nftnl_trace *t) + xfree(t); + } + +-EXPORT_SYMBOL(nftnl_trace_is_set); +-bool nftnl_trace_is_set(const struct nftnl_trace *t, uint16_t attr) ++bool __EXPORTED nftnl_trace_is_set(const struct nftnl_trace *t, uint16_t attr) + { + return t->flags & (1 << attr); + } +@@ -130,8 +127,7 @@ static int nftnl_trace_parse_attr_cb(const struct nlattr *attr, void *data) + return MNL_CB_OK; + } + +-EXPORT_SYMBOL(nftnl_trace_get_data); +-const void *nftnl_trace_get_data(const struct nftnl_trace *trace, ++const void __EXPORTED *nftnl_trace_get_data(const struct nftnl_trace *trace, + uint16_t type, uint32_t *data_len) + { + enum nftnl_trace_attr attr = type; +@@ -201,8 +197,7 @@ const void *nftnl_trace_get_data(const struct nftnl_trace *trace, + return NULL; + } + +-EXPORT_SYMBOL(nftnl_trace_get_str); +-const char *nftnl_trace_get_str(const struct nftnl_trace *trace, uint16_t type) ++const char __EXPORTED *nftnl_trace_get_str(const struct nftnl_trace *trace, uint16_t type) + { + if (!nftnl_trace_is_set(trace, type)) + return NULL; +@@ -216,8 +211,7 @@ const char *nftnl_trace_get_str(const struct nftnl_trace *trace, uint16_t type) + return NULL; + } + +-EXPORT_SYMBOL(nftnl_trace_get_u16); +-uint16_t nftnl_trace_get_u16(const struct nftnl_trace *trace, uint16_t type) ++uint16_t __EXPORTED nftnl_trace_get_u16(const struct nftnl_trace *trace, uint16_t type) + { + const uint16_t *d; + uint32_t dlen; +@@ -229,8 +223,7 @@ uint16_t nftnl_trace_get_u16(const struct nftnl_trace *trace, uint16_t type) + return 0; + } + +-EXPORT_SYMBOL(nftnl_trace_get_u32); +-uint32_t nftnl_trace_get_u32(const struct nftnl_trace *trace, uint16_t type) ++uint32_t __EXPORTED nftnl_trace_get_u32(const struct nftnl_trace *trace, uint16_t type) + { + const uint32_t *d; + uint32_t dlen; +@@ -242,8 +235,7 @@ uint32_t nftnl_trace_get_u32(const struct nftnl_trace *trace, uint16_t type) + return 0; + } + +-EXPORT_SYMBOL(nftnl_trace_get_u64); +-uint64_t nftnl_trace_get_u64(const struct nftnl_trace *trace, uint16_t type) ++uint64_t __EXPORTED nftnl_trace_get_u64(const struct nftnl_trace *trace, uint16_t type) + { + const uint64_t *d; + uint32_t dlen; +@@ -323,9 +315,8 @@ static int nftnl_trace_parse_verdict(const struct nlattr *attr, + } + return 0; + } +-EXPORT_SYMBOL(nftnl_trace_nlmsg_parse); + +-int nftnl_trace_nlmsg_parse(const struct nlmsghdr *nlh, struct nftnl_trace *t) ++int __EXPORTED nftnl_trace_nlmsg_parse(const struct nlmsghdr *nlh, struct nftnl_trace *t) + { + struct nfgenmsg *nfg = mnl_nlmsg_get_payload(nlh); + struct nlattr *tb[NFTA_TRACE_MAX+1] = {}; +diff --git a/src/udata.c b/src/udata.c +index d679dd0..7e2de0f 100644 +--- a/src/udata.c ++++ b/src/udata.c +@@ -16,7 +16,7 @@ + #include <stdint.h> + #include <string.h> + +-struct nftnl_udata_buf *nftnl_udata_buf_alloc(uint32_t data_size) ++struct nftnl_udata_buf __EXPORTED *nftnl_udata_buf_alloc(uint32_t data_size) + { + struct nftnl_udata_buf *buf; + +@@ -28,47 +28,40 @@ struct nftnl_udata_buf *nftnl_udata_buf_alloc(uint32_t data_size) + + return buf; + } +-EXPORT_SYMBOL(nftnl_udata_buf_alloc); + +-void nftnl_udata_buf_free(const struct nftnl_udata_buf *buf) ++void __EXPORTED nftnl_udata_buf_free(const struct nftnl_udata_buf *buf) + { + xfree(buf); + } +-EXPORT_SYMBOL(nftnl_udata_buf_free); + +-uint32_t nftnl_udata_buf_len(const struct nftnl_udata_buf *buf) ++uint32_t __EXPORTED nftnl_udata_buf_len(const struct nftnl_udata_buf *buf) + { + return (uint32_t)(buf->end - buf->data); + } +-EXPORT_SYMBOL(nftnl_udata_buf_len); + +-void *nftnl_udata_buf_data(const struct nftnl_udata_buf *buf) ++void __EXPORTED *nftnl_udata_buf_data(const struct nftnl_udata_buf *buf) + { + return (void *)buf->data; + } +-EXPORT_SYMBOL(nftnl_udata_buf_data); + +-void nftnl_udata_buf_put(struct nftnl_udata_buf *buf, const void *data, ++void __EXPORTED nftnl_udata_buf_put(struct nftnl_udata_buf *buf, const void *data, + uint32_t len) + { + memcpy(buf->data, data, len <= buf->size ? len : buf->size); + buf->end = buf->data + len; + } +-EXPORT_SYMBOL(nftnl_udata_buf_put); + +-struct nftnl_udata *nftnl_udata_start(const struct nftnl_udata_buf *buf) ++struct nftnl_udata __EXPORTED *nftnl_udata_start(const struct nftnl_udata_buf *buf) + { + return (struct nftnl_udata *)buf->data; + } +-EXPORT_SYMBOL(nftnl_udata_start); + +-struct nftnl_udata *nftnl_udata_end(const struct nftnl_udata_buf *buf) ++struct nftnl_udata __EXPORTED *nftnl_udata_end(const struct nftnl_udata_buf *buf) + { + return (struct nftnl_udata *)buf->end; + } +-EXPORT_SYMBOL(nftnl_udata_end); + +-bool nftnl_udata_put(struct nftnl_udata_buf *buf, uint8_t type, uint32_t len, ++bool __EXPORTED nftnl_udata_put(struct nftnl_udata_buf *buf, uint8_t type, uint32_t len, + const void *value) + { + struct nftnl_udata *attr; +@@ -85,55 +78,47 @@ bool nftnl_udata_put(struct nftnl_udata_buf *buf, uint8_t type, uint32_t len, + + return true; + } +-EXPORT_SYMBOL(nftnl_udata_put); + +-bool nftnl_udata_put_strz(struct nftnl_udata_buf *buf, uint8_t type, ++bool __EXPORTED nftnl_udata_put_strz(struct nftnl_udata_buf *buf, uint8_t type, + const char *strz) + { + return nftnl_udata_put(buf, type, strlen(strz) + 1, strz); + } +-EXPORT_SYMBOL(nftnl_udata_put_strz); + +-bool nftnl_udata_put_u32(struct nftnl_udata_buf *buf, uint8_t type, ++bool __EXPORTED nftnl_udata_put_u32(struct nftnl_udata_buf *buf, uint8_t type, + uint32_t data) + { + return nftnl_udata_put(buf, type, sizeof(data), &data); + } +-EXPORT_SYMBOL(nftnl_udata_put_u32); + +-uint8_t nftnl_udata_type(const struct nftnl_udata *attr) ++uint8_t __EXPORTED nftnl_udata_type(const struct nftnl_udata *attr) + { + return attr->type; + } +-EXPORT_SYMBOL(nftnl_udata_type); + +-uint8_t nftnl_udata_len(const struct nftnl_udata *attr) ++uint8_t __EXPORTED nftnl_udata_len(const struct nftnl_udata *attr) + { + return attr->len; + } +-EXPORT_SYMBOL(nftnl_udata_len); + +-void *nftnl_udata_get(const struct nftnl_udata *attr) ++void __EXPORTED *nftnl_udata_get(const struct nftnl_udata *attr) + { + return (void *)attr->value; + } +-EXPORT_SYMBOL(nftnl_udata_get); + +-uint32_t nftnl_udata_get_u32(const struct nftnl_udata *attr) ++uint32_t __EXPORTED nftnl_udata_get_u32(const struct nftnl_udata *attr) + { + uint32_t *data = (uint32_t *)attr->value; + + return *data; + } +-EXPORT_SYMBOL(nftnl_udata_get_u32); + +-struct nftnl_udata *nftnl_udata_next(const struct nftnl_udata *attr) ++struct nftnl_udata __EXPORTED *nftnl_udata_next(const struct nftnl_udata *attr) + { + return (struct nftnl_udata *)&attr->value[attr->len]; + } +-EXPORT_SYMBOL(nftnl_udata_next); + +-int nftnl_udata_parse(const void *data, uint32_t data_len, nftnl_udata_cb_t cb, ++int __EXPORTED nftnl_udata_parse(const void *data, uint32_t data_len, nftnl_udata_cb_t cb, + void *cb_data) + { + int ret = 0; +@@ -147,4 +132,3 @@ int nftnl_udata_parse(const void *data, uint32_t data_len, nftnl_udata_cb_t cb, + + return ret; + } +-EXPORT_SYMBOL(nftnl_udata_parse); +-- +2.11.0 (Apple Git-81) +
meta-networking/recipes-filter/libnftnl/libnftnl/0001-avoid-naming-local-function-as-one-of-printf-family.patch new file +514 -0
51 lines not on this page · raw message
meta-networking/recipes-filter/libnftnl/libnftnl/snprintf_shadow.patch new file +224 -0
224 lines not on this page · raw message
meta-networking/recipes-filter/libnftnl/libnftnl_1.0.6.bb deleted +0 -13
Lines of this file are not shown. View the raw message.
meta-networking/recipes-filter/libnftnl/libnftnl_1.0.7.bb new file +17 -0
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.12.2
Part of the diff is not shown here. View the raw message.
PATCH 10/32 nftables: Upgrade to 0.7
In reply to Khem Raj---
.../recipes-filter/nftables/{nftables_0.6.bb => nftables_0.7.bb} | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
rename meta-networking/recipes-filter/nftables/{nftables_0.6.bb => nftables_0.7.bb} (72%)meta-networking/recipes-filter/nftables/nftables_0.7.bb renamed from meta-networking/recipes-filter/nftables/nftables_0.6.bb +4 -2
@@ -10,7 +10,9 @@ RRECOMMENDS_${PN} += "kernel-module-nf-tables \ SRC_URI = "http://www.netfilter.org/projects/nftables/files/${BP}.tar.bz2 \ file://fix-to-generate-ntf.8.patch \ " -SRC_URI[md5sum] = "fd320e35fdf14b7be795492189b13dae" -SRC_URI[sha256sum] = "dede62655f1c56f2bc9f9be12d103d930dcef6d5f9e0855854ad9c6f93cd6c2d" +SRC_URI[md5sum] = "4c005e76a15a029afaba71d7db21d065" +SRC_URI[sha256sum] = "fe639239d801ce5890397f6f4391c58a934bfc27d8b7d5ef922692de5ec4ed43" + +ASNEEDED = "" inherit autotools pkgconfig
Signature · 1 line
2.12.2
PATCH 11/32 mtr: Upgrade 0.87+git
In reply to Khem RajFixes for musl build are not in a release yet
until then switch to using git for SRC_URI
License file changes are here
https://github.com/traviscross/mtr/commit/dd42b2305a94dcbf80847410be0288df29d6a5ef
--- meta-networking/recipes-support/mtr/mtr_0.86.bb | 21 ------------------- meta-networking/recipes-support/mtr/mtr_0.87.bb | 27 +++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 21 deletions(-) delete mode 100644 meta-networking/recipes-support/mtr/mtr_0.86.bb create mode 100644 meta-networking/recipes-support/mtr/mtr_0.87.bb
meta-networking/recipes-support/mtr/mtr_0.86.bb deleted +0 -21
@@ -1,21 +0,0 @@ -SUMMARY = "Combined traceroute and ping utility" -DESCRIPTION = "mtr combines the functionality of the 'traceroute' and 'ping' programs in a single network diagnostic tool." -HOMEPAGE = "http://www.bitwizard.nl/mtr/" -SECTION = "net" -DEPENDS = "ncurses" - -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \ - file://mtr.c;beginline=5;endline=16;md5=af1fafbbfa1bfd48af839f4bb3221106" - -SRC_URI = "ftp://ftp.bitwizard.nl/mtr/mtr-${PV}.tar.gz" - -SRC_URI[md5sum] = "8d63592c9d4579ef20cf491b41843eb2" -SRC_URI[sha256sum] = "c5d948920b641cc35f8b380fc356ddfe07cce6a9c6474afe242fc58113f28c06" - -inherit autotools - -EXTRA_OECONF = "--without-gtk" - -PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" -PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
meta-networking/recipes-support/mtr/mtr_0.87.bb new file +27 -0
@@ -0,0 +1,27 @@ +SUMMARY = "Combined traceroute and ping utility" +DESCRIPTION = "mtr combines the functionality of the 'traceroute' and 'ping' programs in a single network diagnostic tool." +HOMEPAGE = "http://www.bitwizard.nl/mtr/" +SECTION = "net" +DEPENDS = "ncurses" + +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://ui/mtr.c;beginline=5;endline=16;md5=af1fafbbfa1bfd48af839f4bb3221106" + +PV .= "+git${SRCPV}" + +SRCREV = "e6d0a7e93129e8023654ebf58dfa8135d1b1af56" +SRC_URI = "git://github.com/traviscross/mtr" + +S = "${WORKDIR}/git" + +inherit autotools pkgconfig + +EXTRA_OECONF = "--without-gtk" + +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" +PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," + +PACKAGES += "${PN}-bash-completions" + +FILES_${PN}-bash-completions = "${datadir}/bash-completion/"
Signature · 1 line
2.12.2
PATCH 12/32 ckermit: Fix build with musl
In reply to Khem Rajarrow keys piece is a bit unportable, disable it for now for musl
--- meta-oe/recipes-support/ckermit/ckermit_302.bb | 1 + 1 file changed, 1 insertion(+)
meta-oe/recipes-support/ckermit/ckermit_302.bb +1 -0
@@ -24,6 +24,7 @@ EXTRA_OEMAKE = "-e MAKEFLAGS=" # trying to look inside the stdio headers. CKERMIT_ADDITIONAL = "" CKERMIT_ADDITIONAL_libc-uclibc = "-DNOARROWKEYS" +CKERMIT_ADDITIONAL_libc-musl = "-DNOARROWKEYS" TARGET_CC_ARCH += "${LDFLAGS}"
Signature · 1 line
2.12.2
PATCH 13/32 fftw: Add -D_GNU_SOURCE to CFLAGS
In reply to Khem RajHelps fix build on musl
--- meta-oe/recipes-support/fftw/fftw_3.3.6.bb | 2 ++ 1 file changed, 2 insertions(+)
meta-oe/recipes-support/fftw/fftw_3.3.6.bb +2 -0
@@ -19,6 +19,8 @@ PROVIDES = "fftwl fftwf" EXTRA_OECONF = "--disable-fortran --enable-shared --enable-threads" +CFLAGS += "-D_GNU_SOURCE" + FFTW_NEON = "${@bb.utils.contains('TUNE_FEATURES', 'neon', '--enable-neon', '', d)}" FFTW_NEON_class-native = ""
Signature · 1 line
2.12.2
PATCH 14/32 tipcutils: Fix build with musl
In reply to Khem RajUpgrade to latest git and change SRC_URI to point to git
---
...-include-sys-select.h-for-FD_-definitions.patch | 25 +++
...place-non-standard-uint-with-unsigned-int.patch | 211 +++++++++++++++++++++
.../{tipcutils_2.2.0.bb => tipcutils_git.bb} | 8 +-
3 files changed, 242 insertions(+), 2 deletions(-)
create mode 100644 meta-oe/recipes-extended/tipcutils/tipcutils/0001-include-sys-select.h-for-FD_-definitions.patch
create mode 100644 meta-oe/recipes-extended/tipcutils/tipcutils/0002-replace-non-standard-uint-with-unsigned-int.patch
rename meta-oe/recipes-extended/tipcutils/{tipcutils_2.2.0.bb => tipcutils_git.bb} (82%)meta-oe/recipes-extended/tipcutils/tipcutils/0001-include-sys-select.h-for-FD_-definitions.patch new file +25 -0
@@ -0,0 +1,25 @@ +From e291d720a7d9576063717969dde82c33bac7eecf Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Tue, 11 Apr 2017 14:19:21 -0700 +Subject: [PATCH 1/2] include sys/select.h for FD_* definitions + +Signed-off-by: Khem Raj <[email protected]> +--- + demos/inventory_sim/inventory_sim.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/demos/inventory_sim/inventory_sim.c b/demos/inventory_sim/inventory_sim.c +index fadf27b..22c33d1 100644 +--- a/demos/inventory_sim/inventory_sim.c ++++ b/demos/inventory_sim/inventory_sim.c +@@ -132,6 +132,7 @@ Examples + #include <string.h> + #include <unistd.h> + #include <sys/socket.h> ++#include <sys/select.h> + #include <netinet/in.h> + #include <linux/tipc.h> + +-- +2.12.2 +
meta-oe/recipes-extended/tipcutils/tipcutils/0002-replace-non-standard-uint-with-unsigned-int.patch new file +211 -0
211 lines not on this page · raw message
meta-oe/recipes-extended/tipcutils/tipcutils_git.bb renamed from meta-oe/recipes-extended/tipcutils/tipcutils_2.2.0.bb +6 -2
@@ -2,8 +2,12 @@ SUMMARY = "Transparent Inter-Process Communication protocol" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://tipclog/tipc.h;endline=35;md5=985b6ea8735818511d276c1b466cce98" -SRC_URI = "git://tipc.git.sourceforge.net/gitroot/tipc/tipcutils" -SRCREV = "dc8c2d324cda2e80a6e07ee1998fca0839d4a721" +SRC_URI = "git://git.code.sf.net/p/tipc/tipcutils \ + file://0001-include-sys-select.h-for-FD_-definitions.patch \ + file://0002-replace-non-standard-uint-with-unsigned-int.patch \ + " +SRCREV = "7ab2211b87414ba240b0b2e4af219c1057c9cf9a" +PV = "2.2.0+git${SRCPV}" DEPENDS="virtual/kernel"
Signature · 1 line
2.12.2
PATCH 15/32 lcdproc: Upgrade to 0.5.8
In reply to Khem RajUse github to fetch from
Unify inc file back into main recipe
README is now called README.md so adjust the lic checksum
---
.../0001-include-asm-ioctl.h-explicitly.patch | 43 ++++++++++++++++++++++
meta-oe/recipes-extended/lcdproc/lcdproc_0.5.6.bb | 23 ------------
.../lcdproc/{lcdproc5.inc => lcdproc_git.bb} | 32 ++++++++++++----
3 files changed, 68 insertions(+), 30 deletions(-)
create mode 100644 meta-oe/recipes-extended/lcdproc/lcdproc/0001-include-asm-ioctl.h-explicitly.patch
delete mode 100644 meta-oe/recipes-extended/lcdproc/lcdproc_0.5.6.bb
rename meta-oe/recipes-extended/lcdproc/{lcdproc5.inc => lcdproc_git.bb} (70%)meta-oe/recipes-extended/lcdproc/lcdproc/0001-include-asm-ioctl.h-explicitly.patch new file +43 -0
@@ -0,0 +1,43 @@ +From b5ca64c7398d516e9845d849e8306df7ac024bc4 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Tue, 11 Apr 2017 13:59:34 -0700 +Subject: [PATCH] include asm/ioctl.h explicitly + +Needed for _IOC* defines + +helps compiling with musl where this file is +not included indirectly + +Signed-off-by: Khem Raj <[email protected]> +--- + server/drivers/hd44780-pifacecad.c | 1 + + server/drivers/hd44780-spi.c | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/server/drivers/hd44780-pifacecad.c b/server/drivers/hd44780-pifacecad.c +index 43db19c..e2798ad 100644 +--- a/server/drivers/hd44780-pifacecad.c ++++ b/server/drivers/hd44780-pifacecad.c +@@ -54,6 +54,7 @@ + #include <unistd.h> + #include <fcntl.h> + #include <sys/ioctl.h> ++#include <asm/ioctl.h> + #include <stdint.h> + #include <linux/spi/spidev.h> + +diff --git a/server/drivers/hd44780-spi.c b/server/drivers/hd44780-spi.c +index 5f94333..8a4015b 100644 +--- a/server/drivers/hd44780-spi.c ++++ b/server/drivers/hd44780-spi.c +@@ -29,6 +29,7 @@ + #include <unistd.h> + #include <fcntl.h> + #include <sys/ioctl.h> ++#include <asm/ioctl.h> + #include <stdint.h> + #include <linux/spi/spidev.h> + +-- +2.12.2 +
meta-oe/recipes-extended/lcdproc/lcdproc_0.5.6.bb deleted +0 -23
@@ -1,23 +0,0 @@ -require lcdproc5.inc - -SRC_URI[md5sum] = "df4f5c2c7285eaf6979b9c7768b4877f" -SRC_URI[sha256sum] = "bd2f43c30ff43b30f43110abe6b4a5bc8e0267cb9f57fa97cc5e5ef9488b984a" - -PACKAGECONFIG ?= "" -PACKAGECONFIG[g15] = ",,libg15 g15daemon libg15render," -PACKAGECONFIG[hid] = "--enable-libhid,--disable-libhid,libhid" - -LCD_DRIVERS_append = "${@bb.utils.contains('PACKAGECONFIG', 'g15', '', ',!g15', d)}" - -do_install_append () { - # binaries - install -D -m 0755 clients/lcdvc/lcdvc ${D}${sbindir}/lcdvc - - # configuration files - install -D -m 0644 ${S}/clients/lcdvc/lcdvc.conf ${D}${sysconfdir}/lcdvc.conf -} - -PACKAGES =+ "lcdvc" -CONFFILES_lcdvc = "${sysconfdir}/lcdvc.conf" -FILES_lcdvc = "${sysconfdir}/lcdvc.conf ${sbindir}/lcdvc" -
meta-oe/recipes-extended/lcdproc/lcdproc_git.bb renamed from meta-oe/recipes-extended/lcdproc/lcdproc5.inc +25 -7
@@ -7,20 +7,32 @@ LICENSE = "GPLv2+" DEPENDS = "ncurses lirc" LIC_FILES_CHKSUM = "file://COPYING;md5=18810669f13b87348459e611d31ab760 \ - file://README;beginline=60;md5=637e042cdd3671ba00e78b58ede45d3b" + file://README.md;beginline=107;md5=5c927ce1742d6d5cddc45b7ad6230f75" -SRC_URI = "${SOURCEFORGE_MIRROR}/lcdproc/${BP}.tar.gz" +BASEPV = "0.5.8" +PV = "${BASEPV}+git${SRCPV}" +SRCREV = "f5156e2e41bb418f14761afea22eee8efb49fb85" +SRC_URI = "git://github.com/lcdproc/lcdproc;branch=lcdproc-${BASEPV} \ + file://0001-include-asm-ioctl.h-explicitly.patch \ + " -inherit autotools update-rc.d +S = "${WORKDIR}/git" -LCD_DRIVERS ?= "all" +inherit autotools pkgconfig update-rc.d + +LCD_DRIVERS ?= "all,!irman,!svga" LCD_DEFAULT_DRIVER ?= "curses" PACKAGECONFIG ??= "usb" PACKAGECONFIG[usb] = "--enable-libusb,--disable-libusb,virtual/libusb0" PACKAGECONFIG[ftdi] = "--enable-libftdi,--disable-libftdi,libftdi" +PACKAGECONFIG[g15] = ",,libg15 g15daemon libg15render," +PACKAGECONFIG[hid] = "--enable-libhid,--disable-libhid,libhid" +PACKAGECONFIG[png] = "--enable-libpng,--disable-libpng,libpng" + +LCD_DRIVERS_append = "${@bb.utils.contains('PACKAGECONFIG', 'g15', '', ',!g15', d)}" -EXTRA_OECONF = "--enable-drivers=${LCD_DRIVERS}" +EXTRA_OECONF = "--enable-drivers='${LCD_DRIVERS}'" do_install () { # binaries
@@ -46,9 +58,14 @@ do_install () { for i in server/drivers/*.so; do install -m 0644 $i ${D}${libdir}/lcdproc/ done + # binaries + install -D -m 0755 clients/lcdvc/lcdvc ${D}${sbindir}/lcdvc + + # configuration files + install -D -m 0644 ${S}/clients/lcdvc/lcdvc.conf ${D}${sysconfdir}/lcdvc.conf } -PACKAGES =+ "lcdd" +PACKAGES =+ "lcdd lcdvc" RRECOMMENDS_${PN} = "lcdd"
@@ -58,6 +75,8 @@ FILES_lcdd = "${sysconfdir}/LCDd.conf \ CONFFILES_lcdd = "${sysconfdir}/LCDd.conf" CONFFILES_${PN} = "${sysconfdir}/lcdproc.conf" +CONFFILES_lcdvc = "${sysconfdir}/lcdvc.conf" +FILES_lcdvc = "${sysconfdir}/lcdvc.conf ${sbindir}/lcdvc" # Driver packages
@@ -78,4 +97,3 @@ python populate_packages_prepend() { } PACKAGES_DYNAMIC += "^lcdd-driver-.*" -
Signature · 1 line
2.12.2
PATCH 16/32 evince: Upgrade to 3.24.0
In reply to Khem RajFix build with security flags
---
...1-Add-format-attribute-to-_synctex_malloc.patch | 27 +++++++++++++++
.../evince/evince/0002-fix-gcc6-errors.patch | 39 ----------------------
.../evince/{evince_3.18.2.bb => evince_3.24.0.bb} | 29 +++++++++++-----
3 files changed, 48 insertions(+), 47 deletions(-)
create mode 100644 meta-gnome/recipes-gnome/evince/evince/0001-Add-format-attribute-to-_synctex_malloc.patch
delete mode 100644 meta-gnome/recipes-gnome/evince/evince/0002-fix-gcc6-errors.patch
rename meta-gnome/recipes-gnome/evince/{evince_3.18.2.bb => evince_3.24.0.bb} (60%)meta-gnome/recipes-gnome/evince/evince/0001-Add-format-attribute-to-_synctex_malloc.patch new file +27 -0
@@ -0,0 +1,27 @@ +From 3776fd0b42e473fe51d3678bf26cdaa37e1d8e0d Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Sat, 8 Apr 2017 13:36:12 -0700 +Subject: [PATCH] Add format attribute to _synctex_malloc + +Helps in avoiding compile errors about formating with clang + +Signed-off-by: Khem Raj <[email protected]> +--- + cut-n-paste/synctex/synctex_parser_utils.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/cut-n-paste/synctex/synctex_parser_utils.c b/cut-n-paste/synctex/synctex_parser_utils.c +index f8a9f6f..9459b2d 100644 +--- a/cut-n-paste/synctex/synctex_parser_utils.c ++++ b/cut-n-paste/synctex/synctex_parser_utils.c +@@ -78,6 +78,7 @@ void *_synctex_malloc(size_t size) { + return (void *)ptr; + } + ++__attribute__((__format__ (__printf__, 1, 0))) + int _synctex_error(const char * reason,...) { + va_list arg; + int result; +-- +2.12.2 +
meta-gnome/recipes-gnome/evince/evince/0002-fix-gcc6-errors.patch deleted +0 -39
@@ -1,39 +0,0 @@ ---- evince-3.18.2/backend/comics/comics-document.c.orig 2016-06-22 20:08:01.789805750 +0000 -+++ evince-3.18.2/backend/comics/comics-document.c 2016-06-22 20:07:00.817804688 +0000 -@@ -241,6 +241,8 @@ - /* This function shows how to use the choosen command for decompressing a - * comic book file. It modifies fields of the ComicsDocument struct with - * this information */ -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wformat-nonliteral" - static gboolean - comics_generate_command_lines (ComicsDocument *comics_document, - GError **error) -@@ -296,6 +298,7 @@ - } - - } -+#pragma GCC diagnostic pop - - /* This function chooses an external command for decompressing a comic - * book based on its mime tipe. */ ---- evince-3.18.2/libdocument/ev-document-misc.c.orig 2016-06-22 20:01:49.205799262 +0000 -+++ evince-3.18.2/libdocument/ev-document-misc.c 2016-06-22 20:02:27.233799924 +0000 -@@ -519,7 +519,8 @@ - - return (dp / di); - } -- -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wformat-y2k" - /* Returns a locale specific date and time representation */ - gchar * - ev_document_misc_format_date (GTime utime) -@@ -542,6 +543,7 @@ - - return g_locale_to_utf8 (s, -1, NULL, NULL, NULL); - } -+#pragma GCC diagnostic pop - - void - ev_document_misc_get_pointer_position (GtkWidget *widget,
meta-gnome/recipes-gnome/evince/evince_3.24.0.bb renamed from meta-gnome/recipes-gnome/evince/evince_3.18.2.bb +21 -8
@@ -5,16 +5,16 @@ SECTION = "x11/office" DEPENDS = "gtk+3 libsecret gnome-desktop3 poppler gstreamer1.0-plugins-base orc adwaita-icon-theme intltool-native gnome-common-native" PR = "r5" -inherit gnome pkgconfig gtk-icon-cache gsettings gobject-introspection distro_features_check +inherit gnome pkgconfig gtk-icon-cache gsettings gobject-introspection distro_features_check systemd REQUIRED_DISTRO_FEATURES = "x11" -SRC_URI[archive.md5sum] = "c39af6b8b1c44d4393ef8ac9dab99c0b" -SRC_URI[archive.sha256sum] = "42ad6c7354d881a9ecab136ea84ff867acb942605bcfac48b6c12e1c2d8ecb17" - -SRC_URI += "file://0001-help-remove-YELP-macro.patch \ - file://0002-fix-gcc6-errors.patch \ -" +SRC_URI = "${GNOME_MIRROR}/${GNOMEBN}/${@gnome_verdir("${PV}")}/${GNOMEBN}-${PV}.tar.${GNOME_COMPRESS_TYPE};name=archive \ + file://0001-help-remove-YELP-macro.patch \ + file://0001-Add-format-attribute-to-_synctex_malloc.patch \ + " +SRC_URI[archive.md5sum] = "3fb65ff46de191dc49c481f1fc66201c" +SRC_URI[archive.sha256sum] = "043895af7bbd6f1b57f9ab8778e78cf9c0af5dfcc347eaa94a17bf864c04dc8f" EXTRA_OECONF = " --enable-thumbnailer \ "
@@ -25,22 +25,35 @@ do_compile_prepend() { do_install_append() { - install -d install -d ${D}${datadir}/pixmaps + install -d ${D}${datadir}/pixmaps install -m 0755 ${S}/data/icons/48x48/apps/evince.png ${D}${datadir}/pixmaps/ + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)} + then + install -d ${D}${systemd_unitdir}/system + mv ${D}${libdir}/systemd/user/evince.service ${D}${systemd_unitdir}/system/evince.service + else + rm -rf ${D}${libdir}/systemd/user/evince.service + fi + rmdir --ignore-fail-on-non-empty ${D}${libdir}/systemd/user + rmdir --ignore-fail-on-non-empty ${D}${libdir}/systemd } PACKAGECONFIG ??= "" PACKAGECONFIG[nautilus] = "--enable-nautilus,--disable-nautilus,nautilus" PACKAGECONFIG[browser-plugin] = "--enable-browser-plugin,--disable-browser-plugin," +SYSTEMD_SERVICE_${PN} = "evince.service" + RDEPENDS_${PN} += "glib-2.0-utils" RRECOMMMENDS_${PN} = "adwaita-icon-theme" PACKAGES =+ "${PN}-nautilus-extension" PACKAGES =+ "${PN}-browser-plugin" + FILES_${PN} += "${datadir}/dbus-1 \ ${datadir}/appdata \ ${datadir}/thumbnailers \ + ${systemd_unitdir}/systemd/user/evince.service \ " FILES_${PN}-dbg += "${libdir}/*/*/.debug \ ${libdir}/*/*/*/.debug"
Signature · 1 line
2.12.2
PATCH 17/32 sharutils: Upgrade to 4.15.2
In reply to Khem RajFix format error warnings with clang
--- .../sharutils-4.14/fix-for-cross-compiling.patch | 29 ---------------------- .../sharutils/0001-Fix-build-with-clang.patch | 29 ++++++++++++++++++++++ .../recipes-support/sharutils/sharutils_4.14.bb | 18 -------------- .../recipes-support/sharutils/sharutils_4.15.2.bb | 21 ++++++++++++++++ 4 files changed, 50 insertions(+), 47 deletions(-) delete mode 100644 meta-oe/recipes-support/sharutils/sharutils-4.14/fix-for-cross-compiling.patch create mode 100644 meta-oe/recipes-support/sharutils/sharutils/0001-Fix-build-with-clang.patch delete mode 100644 meta-oe/recipes-support/sharutils/sharutils_4.14.bb create mode 100644 meta-oe/recipes-support/sharutils/sharutils_4.15.2.bb
meta-oe/recipes-support/sharutils/sharutils-4.14/fix-for-cross-compiling.patch deleted +0 -29
@@ -1,29 +0,0 @@ -From 990234af84a5399017d1c4fe03c5c756a8e51e23 Mon Sep 17 00:00:00 2001 -From: Hongjun Yang <[email protected]> -Date: Tue, 20 Aug 2013 09:41:43 +0800 -Subject: [PATCH] fix cross compiling issue - -Upstream-Status: Pending - -Signed-off-by: Hongjun.Yang <[email protected]> - ---- - configure | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/configure b/configure -index 6ee98e0..8067f54 100755 ---- a/configure -+++ b/configure -@@ -26965,7 +26965,7 @@ fi - if test "$cross_compiling" = yes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 - $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} --as_fn_error $? "cannot run test program while cross compiling -+$as_echo "cannot run test program while cross compiling - See \`config.log' for more details" "$LINENO" 5; } - else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext --- -1.8.1.4 -
meta-oe/recipes-support/sharutils/sharutils/0001-Fix-build-with-clang.patch new file +29 -0
@@ -0,0 +1,29 @@ +From fa8371d348f6a8b0799b2e6c38247dd1399d85e3 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Sat, 8 Apr 2017 08:49:48 -0700 +Subject: [PATCH] Fix build with clang + +ATTRIBUTE_FORMAT_ARG macro gets computed to be empty with clang +whereas it does support format attribute, we hard code it + +Signed-off-by: Khem Raj <[email protected]> +--- + src/shar-opts.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/shar-opts.h b/src/shar-opts.h +index a287046..172676f 100644 +--- a/src/shar-opts.h ++++ b/src/shar-opts.h +@@ -377,7 +377,7 @@ extern tOptions sharOptions; + # define ATTRIBUTE_FORMAT_ARG(_a) + # endif + +-static inline char* aoGetsText(char const* pz) ATTRIBUTE_FORMAT_ARG(1); ++static inline char* aoGetsText(char const* pz) __attribute__ ((format_arg(1))); + static inline char* aoGetsText(char const* pz) { + if (pz == NULL) return NULL; + return (char*)gettext(pz); +-- +2.12.2 +
meta-oe/recipes-support/sharutils/sharutils_4.14.bb deleted +0 -18
@@ -1,18 +0,0 @@ -SUMMARY = "This is the set of GNU shar utilities." -HOMEPAGE = "http://www.gnu.org/software/sharutils/" -SECTION = "console/utils" -LICENSE="GPLv3+" -LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" - -inherit gettext autotools-brokensep - -SRC_URI = "ftp://ftp.gnu.org/gnu/sharutils/sharutils-4.14.tar.gz \ - file://fix-for-cross-compiling.patch \ -" - -SRC_URI[md5sum] = "5686c11131b4c4c0841f8f3ef34d136a" -SRC_URI[sha256sum] = "90f5107c167cfd1b299bb211828d2586471087863dbed698f53109cd5f717208" - -do_configure () { - oe_runconf -}
meta-oe/recipes-support/sharutils/sharutils_4.15.2.bb new file +21 -0
@@ -0,0 +1,21 @@ +SUMMARY = "This is the set of GNU shar utilities." +HOMEPAGE = "http://www.gnu.org/software/sharutils/" +SECTION = "console/utils" +LICENSE="GPLv3+" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" + +inherit gettext autotools + +SRC_URI = "ftp://ftp.gnu.org/gnu/${BPN}/${BP}.tar.gz \ + file://0001-Fix-build-with-clang.patch \ +" +SRC_URI[md5sum] = "32a51b23e25ad5e6af4b89f228be1800" +SRC_URI[sha256sum] = "ee336e68549664e7a19b117adf02edfdeac6307f22e5ba78baca457116914637" + +do_install_append() { + if [ -e ${D}${libdir}/charset.alias ] + then + rm -rf ${D}${libdir}/charset.alias + rmdir --ignore-fail-on-non-empty ${D}${libdir} + fi +}
Signature · 1 line
2.12.2
PATCH 18/32 avro-c: Fix build with clang
In reply to Khem RajUpdate SRC_URI to point to github mirror
Add a patch to fix build with clang
--- ...0001-avro-c-Fix-build-with-clang-compiler.patch | 37 ++++++++++++++++++++++ meta-oe/recipes-support/avro/avro-c_1.8.1.bb | 10 +++--- 2 files changed, 43 insertions(+), 4 deletions(-) create mode 100644 meta-oe/recipes-support/avro/avro-c/0001-avro-c-Fix-build-with-clang-compiler.patch
meta-oe/recipes-support/avro/avro-c/0001-avro-c-Fix-build-with-clang-compiler.patch new file +37 -0
@@ -0,0 +1,37 @@ +From 518bb8ccfb3f3fc143fbd571782f3e40573d01b5 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Mon, 10 Apr 2017 09:15:04 -0700 +Subject: [PATCH] avro-c: Fix build with clang compiler + +Clang advertizes itself to be compatible with gcc 4.2.1 +while that was true several years ago, it now supports +a lot more newer features, the test to just check gcc +version should be supplanted with clang check as well +so atomic support in clang can be asserted as well + +Fixes + +lang/c/src/avro/refcount.h:301:2: error: "No atomic implementation!" + +Signed-off-by: Khem Raj <[email protected]> +--- + lang/c/src/avro/refcount.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/lang/c/src/avro/refcount.h b/lang/c/src/avro/refcount.h +index 69afa4fc..d76ba057 100644 +--- a/lang/c/src/avro/refcount.h ++++ b/lang/c/src/avro/refcount.h +@@ -118,7 +118,8 @@ avro_refcount_dec(volatile int *refcount) + * GCC intrinsics + */ + +-#elif (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) > 40500 ++#elif (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) > 40500 \ ++|| defined(__clang__) + + static inline void + avro_refcount_set(volatile int *refcount, int value) +-- +2.12.2 +
meta-oe/recipes-support/avro/avro-c_1.8.1.bb +6 -4
@@ -2,16 +2,18 @@ SUMMARY = "Apache Avro data serialization system." HOMEPAGE = "http://apr.apache.org/" SECTION = "libs" - LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://LICENSE;md5=73bdf70f268f0b3b9c5a83dd7a6f3324" DEPENDS = "jansson zlib xz" +PV .= "+git${SRCPV}" -SRC_URI = "${APACHE_MIRROR}/avro/avro-${PV}/c/avro-c-${PV}.tar.gz" +SRCREV = "4b3677c32b879e0e7f717eb95f9135ac654da760" +SRC_URI = "git://github.com/apache/avro \ + file://0001-avro-c-Fix-build-with-clang-compiler.patch;patchdir=../../ \ +" -SRC_URI[md5sum] = "b268348536714541e10411823a1b59b0" -SRC_URI[sha256sum] = "e5042088fa47e1aa2860c5cfed0bd061d81f9e96628f8b4d87a24d9b8c5e4ecc" +S = "${WORKDIR}/git/lang/c" LDFLAGS_append_libc-uclibc = " -lm"
Signature · 1 line
2.12.2
PATCH 19/32 dash: Fix build with clang
In reply to Khem Raj--- .../0001-Fix-printf-format-errors-with-clang.patch | 28 ++++++++++++++++++++++ meta-oe/recipes-extended/dash/dash_0.5.8.bb | 4 +++- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 meta-oe/recipes-extended/dash/dash/0001-Fix-printf-format-errors-with-clang.patch
meta-oe/recipes-extended/dash/dash/0001-Fix-printf-format-errors-with-clang.patch new file +28 -0
@@ -0,0 +1,28 @@ +From 3ddf397febf47f8de9ca2805e92355ecb3ba0e9f Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Sat, 8 Apr 2017 12:37:54 -0700 +Subject: [PATCH] Fix printf format errors with clang + +error: format string is not a string literal (potentially insecure) + +Signed-off-by: Khem Raj <[email protected]> +--- + src/jobs.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/jobs.c b/src/jobs.c +index c2c2332..dcb81c1 100644 +--- a/src/jobs.c ++++ b/src/jobs.c +@@ -427,7 +427,7 @@ sprint_status(char *s, int status, int sigonly) + goto out; + #endif + } +- col = fmtstr(s, 32, strsignal(st)); ++ col = fmtstr(s, 32, "%s", strsignal(st)); + #ifdef WCOREDUMP + if (WCOREDUMP(status)) { + col += fmtstr(s + col, 16, " (core dumped)"); +-- +2.12.2 +
meta-oe/recipes-extended/dash/dash_0.5.8.bb +3 -1
@@ -7,7 +7,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b5262b4a1a1bff72b48e935531976d2e" inherit autotools update-alternatives -SRC_URI = "http://gondor.apana.org.au/~herbert/${BPN}/files/${BP}.tar.gz" +SRC_URI = "http://gondor.apana.org.au/~herbert/${BPN}/files/${BP}.tar.gz \ + file://0001-Fix-printf-format-errors-with-clang.patch \ + " SRC_URI[md5sum] = "5c152209680dab3c319e8923f6c51378" SRC_URI[sha256sum] = "c6db3a237747b02d20382a761397563d813b306c020ae28ce25a1c3915fac60f"
Signature · 1 line
2.12.2
PATCH 20/32 xfce4-notes-plugin: Fix format string errors
In reply to Khem Raj--- .../notes/files/01_fix_format-string.patch | 53 ++++++++++++++++++++++ .../notes/xfce4-notes-plugin_1.8.1.bb | 1 + 2 files changed, 54 insertions(+) create mode 100644 meta-xfce/recipes-panel-plugins/notes/files/01_fix_format-string.patch
meta-xfce/recipes-panel-plugins/notes/files/01_fix_format-string.patch new file +53 -0
@@ -0,0 +1,53 @@ +Fix formatting strings when compiling with Wformat options + +Imported from debian + +--- a/lib/application.c ++++ b/lib/application.c +@@ -352,7 +352,7 @@ static void xnp_application_update_notes + XfconfChannel* _tmp16_; + const gchar* _tmp17_; + _tmp9_ = _ ("Select notes path"); +- _tmp10_ = (GtkMessageDialog*) gtk_message_dialog_new (NULL, 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, _tmp9_); ++ _tmp10_ = (GtkMessageDialog*) gtk_message_dialog_new (NULL, 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, "%s", _tmp9_); + g_object_ref_sink (_tmp10_); + error_dialog = _tmp10_; + _tmp11_ = error_dialog; +@@ -419,7 +419,7 @@ static void xnp_application_update_notes + XfconfChannel* _tmp35_; + const gchar* _tmp36_; + _tmp27_ = _ ("Select notes path"); +- _tmp28_ = (GtkMessageDialog*) gtk_message_dialog_new (NULL, 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, _tmp27_); ++ _tmp28_ = (GtkMessageDialog*) gtk_message_dialog_new (NULL, 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, "%s", _tmp27_); + g_object_ref_sink (_tmp28_); + error_dialog = _tmp28_; + _tmp29_ = error_dialog; +@@ -2082,7 +2082,7 @@ static void xnp_application_delete_windo + gint _tmp9_; + _tmp3_ = window; + _tmp4_ = _ ("Are you sure you want to delete this group?"); +- _tmp5_ = (GtkMessageDialog*) gtk_message_dialog_new ((GtkWindow*) _tmp3_, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, _tmp4_); ++ _tmp5_ = (GtkMessageDialog*) gtk_message_dialog_new ((GtkWindow*) _tmp3_, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, "%s", _tmp4_); + g_object_ref_sink (_tmp5_); + dialog = _tmp5_; + _tmp6_ = dialog; +@@ -2721,7 +2721,7 @@ void xnp_application_open_settings_dialo + e = _inner_error_; + _inner_error_ = NULL; + _tmp0_ = _ ("Unable to open the settings dialog"); +- _tmp1_ = (GtkMessageDialog*) gtk_message_dialog_new (NULL, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, _tmp0_); ++ _tmp1_ = (GtkMessageDialog*) gtk_message_dialog_new (NULL, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, "%s", _tmp0_); + g_object_ref_sink (_tmp1_); + error_dialog = _tmp1_; + _tmp2_ = error_dialog; +--- a/lib/window.c ++++ b/lib/window.c +@@ -3542,7 +3542,7 @@ void xnp_window_delete_note (XnpWindow* + GtkMessageDialog* _tmp13_; + gint _tmp14_; + _tmp9_ = _ ("Are you sure you want to delete this note?"); +- _tmp10_ = (GtkMessageDialog*) gtk_message_dialog_new ((GtkWindow*) self, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, _tmp9_); ++ _tmp10_ = (GtkMessageDialog*) gtk_message_dialog_new ((GtkWindow*) self, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, "%s", _tmp9_); + g_object_ref_sink (_tmp10_); + dialog = _tmp10_; + _tmp11_ = dialog;
meta-xfce/recipes-panel-plugins/notes/xfce4-notes-plugin_1.8.1.bb +1 -0
@@ -9,6 +9,7 @@ DEPENDS += "gtk+ libxfce4ui xfce4-panel xfconf libunique" SRC_URI += " \ file://0001-main-status-icon.c-remove-deprecated-g_type_init.patch \ + file://01_fix_format-string.patch \ " SRC_URI[md5sum] = "31cb9520b01512a94344770b4befdb3b" SRC_URI[sha256sum] = "07a4c3e71431c24f97d2e270452dd0fa51ff0bdb6219a13a20d0bfa8d9de54b2"
Signature · 1 line
2.12.2
PATCH 21/32 dates: Fix buils with security flags
In reply to Khem RajUpdate to latest and drop patches which are upstreamed. Add a patch to fix security warnings
--- .../dates/0001-Fix-format-security-warnings.patch | 54 ++++++++++++++++ ...ew-evolution-data-server-e_source_-color-.patch | 72 ---------------------- .../recipes-gnome/pimlico/dates/make-382.patch | 18 ------ meta-gnome/recipes-gnome/pimlico/dates_git.bb | 11 ++-- 4 files changed, 59 insertions(+), 96 deletions(-) create mode 100644 meta-gnome/recipes-gnome/pimlico/dates/0001-Fix-format-security-warnings.patch delete mode 100644 meta-gnome/recipes-gnome/pimlico/dates/0001-Update-to-new-evolution-data-server-e_source_-color-.patch delete mode 100644 meta-gnome/recipes-gnome/pimlico/dates/make-382.patch
meta-gnome/recipes-gnome/pimlico/dates/0001-Fix-format-security-warnings.patch new file +54 -0
@@ -0,0 +1,54 @@ +From 687881c5fa342686c8724adcdac0f9d555a351c3 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Wed, 5 Apr 2017 18:10:57 -0700 +Subject: [PATCH] Fix format security warnings + +Signed-off-by: Khem Raj <[email protected]> +--- + src/dates_callbacks.c | 2 +- + src/dates_gtk.c | 2 +- + src/gconf-bridge.c | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/dates_callbacks.c b/src/dates_callbacks.c +index d704c8f..46b8cb1 100644 +--- a/src/dates_callbacks.c ++++ b/src/dates_callbacks.c +@@ -365,7 +365,7 @@ dates_about_cb (GtkWidget *widget, DatesData *d) + + if (!pixb) { + g_assert (error); +- g_warning (error->message); ++ g_warning ("%s", error->message); + g_clear_error (&error); + } + +diff --git a/src/dates_gtk.c b/src/dates_gtk.c +index 403bc25..fd691d2 100644 +--- a/src/dates_gtk.c ++++ b/src/dates_gtk.c +@@ -1114,7 +1114,7 @@ calendar_do_edit_dialog_response_cb (GtkDialog *dialog, gint response_id, gpoint + GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_WARNING, + GTK_BUTTONS_NONE, +- prompt); ++ "%s", prompt); + + g_free (prompt); + +diff --git a/src/gconf-bridge.c b/src/gconf-bridge.c +index 49754cf..67d3757 100644 +--- a/src/gconf-bridge.c ++++ b/src/gconf-bridge.c +@@ -1220,7 +1220,7 @@ error_handler (GConfClient *client, + dlg = gtk_message_dialog_new (NULL, 0, + GTK_MESSAGE_ERROR, + GTK_BUTTONS_OK, +- message); ++ "%s", message); + g_free (message); + + gtk_message_dialog_format_secondary_text +-- +2.12.2 +
meta-gnome/recipes-gnome/pimlico/dates/0001-Update-to-new-evolution-data-server-e_source_-color-.patch deleted +0 -72
72 lines not on this page · raw message
meta-gnome/recipes-gnome/pimlico/dates/make-382.patch deleted +0 -18
@@ -1,18 +0,0 @@ -Make 3.82 is offended by the use of spaces instead of tabs. This has been fixed -in upstream git. - -JL - 15/12/10 - -Upstream-Status: Accepted - -Index: git/Makefile.am -=================================================================== ---- git.orig/Makefile.am -+++ git/Makefile.am -@@ -7,5 +7,5 @@ DISTCLEANFILES = intltool-extract intlto - MAINTAINERCLEANFILES = $(DISTCLEANFILES) aclocal.m4 compile config.guess config.sub configure depcomp install-sh ltmain.sh Makefile.in missing - - snapshot: -- $(MAKE) dist distdir=$(PACKAGE)-snap`date +"%Y%m%d"` -+ $(MAKE) dist distdir=$(PACKAGE)-snap`date +"%Y%m%d"` -
meta-gnome/recipes-gnome/pimlico/dates_git.bb +5 -6
@@ -5,15 +5,14 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \ file://src/dates_hildon.c;endline=19;md5=63938904198b25de429abb65fbdbdb8a \ file://src/gconf-bridge.c;endline=22;md5=ad7626c6daf4aec590474a243f4912fa" -SRCREV = "514185dc1f6588085fda41eb59898b93d0487dd4" +SRCREV = "c8e30fa3211dcdfcda48184f4c57746a552b9c7a" PV = "0.4.11+git${SRCPV}" PR = "r9" S = "${WORKDIR}/git" SRC_URI = "git://git.gnome.org/${BPN} \ - file://make-382.patch \ - file://dso_linking_change_build_fix.patch \ - file://uclibc-NL_TIME_FIRST_WEEKDAY-absent.patch \ - file://0001-Update-to-new-evolution-data-server-e_source_-color-.patch \ -" + file://dso_linking_change_build_fix.patch \ + file://uclibc-NL_TIME_FIRST_WEEKDAY-absent.patch \ + file://0001-Fix-format-security-warnings.patch \ + "
Signature · 1 line
2.12.2
PATCH 22/32 zeromq: Upgrade to 4.1.6
In reply to Khem Raj---
.../recipes-connectivity/zeromq/{zeromq_4.1.5.bb => zeromq_4.1.6.bb} | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
rename meta-oe/recipes-connectivity/zeromq/{zeromq_4.1.5.bb => zeromq_4.1.6.bb} (87%)meta-oe/recipes-connectivity/zeromq/zeromq_4.1.6.bb renamed from meta-oe/recipes-connectivity/zeromq/zeromq_4.1.5.bb +2 -2
@@ -9,8 +9,8 @@ PACKAGECONFIG[libsodium] = "--with-libsodium, --without-libsodium, libsodium" SRC_URI = "http://github.com/zeromq/zeromq4-1/releases/download/v${PV}/zeromq-${PV}.tar.gz \ file://run-ptest \ " -SRC_URI[md5sum] = "e7adf4b7dbae09b28cfd10d26cd67fac" -SRC_URI[sha256sum] = "04aac57f081ffa3a2ee5ed04887be9e205df3a7ddade0027460b8042432bdbcf" +SRC_URI[md5sum] = "c89db4dbc0b90c34c9f4983cbff6d321" +SRC_URI[sha256sum] = "02ebf60a43011e770799336365bcbce2eb85569e9b5f52aa0d8cc04672438a0a" S = "${WORKDIR}/zeromq-${PV}"
Signature · 1 line
2.12.2
PATCH 23/32 cdparanoia: Fix autoconf do it builds on new arches like aarch64
In reply to Khem RajAlso build out of tree builds while here
--- .../cdparanoia/cdparanoia_10.2.bb | 6 +++- .../files/dont-use-internal-configs.patch | 30 ++++++++++++++++ .../cdparanoia/files/out-of-tree-build.patch | 42 ++++++++++++++++++++++ 3 files changed, 77 insertions(+), 1 deletion(-) create mode 100644 meta-multimedia/recipes-multimedia/cdparanoia/files/dont-use-internal-configs.patch create mode 100644 meta-multimedia/recipes-multimedia/cdparanoia/files/out-of-tree-build.patch
meta-multimedia/recipes-multimedia/cdparanoia/cdparanoia_10.2.bb +5 -1
@@ -11,6 +11,8 @@ SRC_URI = "http://downloads.xiph.org/releases/cdparanoia/cdparanoia-III-${PV}.sr file://0001-Use-DESTDIR-in-install-Makefile-rule.patch \ file://0002-interface-remove-C-reserved-keyword.patch \ file://0003-Fix-missing-shared-object-LDFLAGS.patch \ + file://dont-use-internal-configs.patch \ + file://out-of-tree-build.patch \ " SRC_URI[md5sum] = "b304bbe8ab63373924a744eac9ebc652" SRC_URI[sha256sum] = "005db45ef4ee017f5c32ec124f913a0546e77014266c6a1c50df902a55fe64df"
@@ -24,4 +26,6 @@ S = "${WORKDIR}/cdparanoia-III-${PV}" # between the compilation of those two targets) PARALLEL_MAKE = "" -inherit autotools-brokensep +EXTRA_OECONF = "CC='${CC}' CFLAGS='${CFLAGS}'" + +inherit autotools
meta-multimedia/recipes-multimedia/cdparanoia/files/dont-use-internal-configs.patch new file +30 -0
@@ -0,0 +1,30 @@ +Index: cdparanoia-III-10.2/configure.in +=================================================================== +--- cdparanoia-III-10.2.orig/configure.in ++++ cdparanoia-III-10.2/configure.in +@@ -1,13 +1,8 @@ + AC_INIT(interface/interface.c) + +-cp $srcdir/configure.guess $srcdir/config.guess +-cp $srcdir/configure.sub $srcdir/config.sub +- + AC_CANONICAL_HOST + +-if test -z "$CC"; then +- AC_PROG_CC +-fi ++AC_PROG_CC + AC_PROG_RANLIB + AC_CHECK_PROG(AR,ar,ar) + AC_CHECK_PROG(INSTALL,install,install) +@@ -44,8 +39,8 @@ case 4 in + $ac_cv_sizeof_long) SIZE32="long";; + esac + +-AC_CHECK_TYPE(int16_t,SIZE16="int16_t",,) +-AC_CHECK_TYPE(int32_t,SIZE32="size32_t",,) ++AC_CHECK_TYPES([int16_t], [SIZE16="int16_t"], [], [[#include <stdint.h>]]) ++AC_CHECK_TYPES([int32_t], [SIZE32="int32_t"], [], [[#include <stdint.h>]]) + + if test -z "$SIZE16"; then + AC_MSG_ERROR(No 16 bit type found on this platform!)
meta-multimedia/recipes-multimedia/cdparanoia/files/out-of-tree-build.patch new file +42 -0
42 lines not on this page · raw message
Signature · 1 line
2.12.2
PATCH 24/32 pngcheck: Fix cross build and format string errors
In reply to Khem Raj--- ...-make-Respect-variables-from-environement.patch | 60 ++++++++++++++++++++++ ...T-windowsize-Fix-format-string-errors-in-.patch | 36 +++++++++++++ .../pngcheck/10-pngsplit-format-strings.patch | 40 +++++++++++++++ meta-oe/recipes-support/pngcheck/pngcheck_2.3.0.bb | 12 +++-- 4 files changed, 145 insertions(+), 3 deletions(-) create mode 100644 meta-oe/recipes-support/pngcheck/pngcheck/0001-make-Respect-variables-from-environement.patch create mode 100644 meta-oe/recipes-support/pngcheck/pngcheck/0001-png-fix-IDAT-windowsize-Fix-format-string-errors-in-.patch create mode 100644 meta-oe/recipes-support/pngcheck/pngcheck/10-pngsplit-format-strings.patch
meta-oe/recipes-support/pngcheck/pngcheck/0001-make-Respect-variables-from-environement.patch new file +60 -0
@@ -0,0 +1,60 @@ +From 6245f18091cad11520c159248c1cf7a84f12857c Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Wed, 5 Apr 2017 13:15:43 -0700 +Subject: [PATCH] make: Respect variables from environement + +link with shared zlib + +Signed-off-by: Khem Raj <[email protected]> +--- + Makefile.unx | 18 ++++++++---------- + 1 file changed, 8 insertions(+), 10 deletions(-) + +diff --git a/Makefile.unx b/Makefile.unx +index 772da46..4ae7061 100644 +--- a/Makefile.unx ++++ b/Makefile.unx +@@ -24,18 +24,16 @@ ZINC = -I$(ZPATH) + ZLIB = $(ZPATH)/libz.a + + INCS = $(ZINC) +-LIBS = $(ZLIB) ++LIBS = -lz + +-CC = gcc +-LD = gcc +-RM = rm +-CFLAGS = -O -Wall $(INCS) -DUSE_ZLIB ++CC ?= gcc ++LD ?= gcc ++RM ?= rm ++CFLAGS += -O -Wall $(INCS) -DUSE_ZLIB + # [note that -Wall is a gcc-specific compilation flag ("all warnings on")] + O = .o + E = + +-LDFLAGS = +- + PROG = pngcheck + PROG2 = pngsplit + PROG3 = png-fix-IDAT-windowsize +@@ -57,13 +55,13 @@ EXES = $(PROG)$(E) $(PROG2)$(E) $(PROG3)$(E) + all: $(EXES) + + $(PROG)$(E): $(PROG).c +- $(CC) $(CFLAGS) -o $@ $(PROG).c $(LIBS) ++ $(CC) $(CFLAGS) -o $@ $(PROG).c $(LDFLAGS) $(LIBS) + + $(PROG2)$(E): gpl/$(PROG2).c +- $(CC) $(CFLAGS) -o $@ gpl/$(PROG2).c $(LIBS) ++ $(CC) $(CFLAGS) -o $@ gpl/$(PROG2).c $(LDFLAGS) $(LIBS) + + $(PROG3)$(E): gpl/$(PROG3).c +- $(CC) $(CFLAGS) -o $@ gpl/$(PROG3).c $(LIBS) ++ $(CC) $(CFLAGS) -o $@ gpl/$(PROG3).c $(LDFLAGS) $(LIBS) + + + # maintenance --------------------------------------------------------------- +-- +2.12.2 +
meta-oe/recipes-support/pngcheck/pngcheck/0001-png-fix-IDAT-windowsize-Fix-format-string-errors-in-.patch new file +36 -0
@@ -0,0 +1,36 @@ +From d4d8257953bd1e7be167aed24c0578362cc5f675 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Wed, 5 Apr 2017 13:12:30 -0700 +Subject: [PATCH 1/2] png-fix-IDAT-windowsize: Fix format string errors in + fprintf + +Signed-off-by: Khem Raj <[email protected]> +--- + gpl/png-fix-IDAT-windowsize.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/gpl/png-fix-IDAT-windowsize.c b/gpl/png-fix-IDAT-windowsize.c +index 6d4ef9c..d212017 100644 +--- a/gpl/png-fix-IDAT-windowsize.c ++++ b/gpl/png-fix-IDAT-windowsize.c +@@ -127,7 +127,7 @@ int main(int argc, char *argv[]) + fprintf(stderr, " Compiled with zlib %s; using zlib %s.\n", + ZLIB_VERSION, zlib_version); + fprintf(stderr, "\n"); +- fprintf(stderr, png_fix_IDAT_windowsize_usage); ++ fprintf(stderr, "%s", png_fix_IDAT_windowsize_usage); + fflush(stderr); + return 1; + } +@@ -143,7 +143,7 @@ int main(int argc, char *argv[]) + fflush(stdout); + + if ( argn == argc ) { +- fprintf(stderr, png_fix_IDAT_windowsize_usage); ++ fprintf(stderr, "%s", png_fix_IDAT_windowsize_usage); + fflush(stderr); + return 5; + } else { +-- +2.12.2 +
meta-oe/recipes-support/pngcheck/pngcheck/10-pngsplit-format-strings.patch new file +40 -0
@@ -0,0 +1,40 @@ +From: Jari Aalto <[email protected]> +Subject: Correct fomat strings fro hardened build flags + +--- + gpl/pngsplit.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +--- a/gpl/pngsplit.c ++++ b/gpl/pngsplit.c +@@ -141,8 +141,8 @@ + 0 == strncmp( argv[argn], "-quiet", 2 ) ) + verbose = 0; + else { +- fprintf(stderr, pngsplit_hdr); +- fprintf(stderr, pngsplit_usage); ++ fprintf(stderr, "%s", pngsplit_hdr); ++ fprintf(stderr, "%s", pngsplit_usage); + fflush(stderr); + return 1; + } +@@ -150,8 +150,8 @@ + } + + if ( argn == argc ) { +- fprintf(stderr, pngsplit_hdr); +- fprintf(stderr, pngsplit_usage); ++ fprintf(stderr, "%s", pngsplit_hdr); ++ fprintf(stderr, "%s", pngsplit_usage); + fflush(stderr); + return 5; + } else { +@@ -162,7 +162,7 @@ + + /*============================= MAIN LOOP =============================*/ + +- fprintf(stdout, pngsplit_hdr); ++ fprintf(stdout, "%s", pngsplit_hdr); + fflush(stdout); + + while (argn <= argc) {
meta-oe/recipes-support/pngcheck/pngcheck_2.3.0.bb +9 -3
@@ -4,15 +4,21 @@ LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://gpl/COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" DEPENDS = "zlib libpng" -SRC_URI = "${SOURCEFORGE_MIRROR}/project/png-mng/${BPN}/${PV}/${BPN}-${PV}.tar.gz" +SRC_URI = "${SOURCEFORGE_MIRROR}/project/png-mng/${BPN}/${PV}/${BPN}-${PV}.tar.gz \ + file://10-pngsplit-format-strings.patch \ + file://0001-png-fix-IDAT-windowsize-Fix-format-string-errors-in-.patch \ + file://0001-make-Respect-variables-from-environement.patch \ + " SRC_URI[md5sum] = "980bd6d9a3830fdce746d7fe3c9166ee" SRC_URI[sha256sum] = "77f0a039ac64df55fbd06af6f872fdbad4f639d009bbb5cd5cbe4db25690f35f" -EXTRA_OEMAKE = "-e MAKEFLAGS=" +CFLAGS += "-DUSE_ZLIB" + +EXTRA_OEMAKE = "-f ${S}/Makefile.unx" do_compile() { - oe_runmake -f Makefile.unx INCS=-I${STAGING_DIR_HOST}${incdir} LIBS='${STAGING_DIR_HOST}${libdir}/libz.a ${LDFLAGS}' + oe_runmake } do_install() {
Signature · 1 line
2.12.2
PATCH 25/32 librcf: Fix build on aarch64
In reply to Khem Raj--- .../recipes-devtools/librcf/librcf/aarch64-support.patch | 13 +++++++++++++ meta-oe/recipes-devtools/librcf/librcf_2.2.0.0.bb | 1 + 2 files changed, 14 insertions(+) create mode 100644 meta-oe/recipes-devtools/librcf/librcf/aarch64-support.patch
meta-oe/recipes-devtools/librcf/librcf/aarch64-support.patch new file +13 -0
@@ -0,0 +1,13 @@ +Index: RCF-2.2.0.0/src/RCF/ByteOrdering.cpp +=================================================================== +--- RCF-2.2.0.0.orig/src/RCF/ByteOrdering.cpp ++++ RCF-2.2.0.0/src/RCF/ByteOrdering.cpp +@@ -60,7 +60,7 @@ namespace RCF { + + const ByteOrder MachineByteOrder = LittleEndian; + +-#elif defined(__arm__) ++#elif defined(__arm__) || defined(__aarch64__) + + const ByteOrder MachineByteOrder = LittleEndian; +
meta-oe/recipes-devtools/librcf/librcf_2.2.0.0.bb +1 -0
@@ -12,6 +12,7 @@ LIC_FILES_CHKSUM = "file://license.txt;md5=137c2935b51c95068a8b1bbd434ffe2d" SRC_URI = "http://www.deltavsoft.com/downloads/RCF-${PV}.tar.gz \ file://0001-Add-CMake-build-files.patch \ + file://aarch64-support.patch \ " SRC_URI[md5sum] = "7ecb3c73f7eb66dba8790b659374f690"
Signature · 1 line
2.12.2
PATCH 26/32 libutempter: Fix build with musl
In reply to Khem Raj--- meta-oe/recipes-support/libutempter/libutempter.bb | 4 +- .../libutempter-remove-glibc-assumption.patch | 81 ++++++++++++++++++++++ 2 files changed, 84 insertions(+), 1 deletion(-) create mode 100644 meta-oe/recipes-support/libutempter/libutempter/libutempter-remove-glibc-assumption.patch
meta-oe/recipes-support/libutempter/libutempter.bb +3 -1
@@ -11,7 +11,9 @@ SRCREV = "3ef74fff310f09e2601e241b9f042cd39d591018" PV = "1.1.6-alt2+git${SRCPV}" SRC_URI = "git://git.altlinux.org/people/ldv/packages/libutempter.git \ - file://0001-Fix-macro-error.patch" + file://0001-Fix-macro-error.patch \ + file://libutempter-remove-glibc-assumption.patch \ + " S = "${WORKDIR}/git/${BPN}"
meta-oe/recipes-support/libutempter/libutempter/libutempter-remove-glibc-assumption.patch new file +81 -0
81 lines not on this page · raw message
Signature · 1 line
2.12.2
PATCH 27/32 mosh: Upgrade to 1.3.0
In reply to Khem Raj---
meta-oe/recipes-connectivity/mosh/{mosh_1.2.4.bb => mosh_1.3.0.bb} | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
rename meta-oe/recipes-connectivity/mosh/{mosh_1.2.4.bb => mosh_1.3.0.bb} (93%)meta-oe/recipes-connectivity/mosh/mosh_1.3.0.bb renamed from meta-oe/recipes-connectivity/mosh/mosh_1.2.4.bb +2 -3
@@ -15,9 +15,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" DEPENDS = "protobuf-native protobuf ncurses zlib libio-pty-perl openssl libutempter" SRC_URI = "http://mosh.mit.edu/mosh-${PV}.tar.gz" - -SRC_URI[md5sum] = "c2d918f4d91fdc32546e2e089f9281b2" -SRC_URI[sha256sum] = "e74d0d323226046e402dd469a176075fc2013b69b0e67cea49762c957175df46" +SRC_URI[md5sum] = "d961276995936953bf2d5a794068b076" +SRC_URI[sha256sum] = "320e12f461e55d71566597976bd9440ba6c5265fa68fbf614c6f1c8401f93376" inherit autotools pkgconfig
Signature · 1 line
2.12.2
PATCH 28/32 dstat: Add missing dep on xmlto-native
In reply to Khem RajFixes
| make[1]: xmlto: Command not found
| make[1]: *** [dstat.1] Error 127
--- meta-oe/recipes-support/dstat/dstat_0.7.3.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta-oe/recipes-support/dstat/dstat_0.7.3.bb +1 -1
@@ -7,7 +7,7 @@ HOMEPAGE = "http://dag.wiee.rs/home-made/dstat" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" -DEPENDS += "asciidoc-native" +DEPENDS += "asciidoc-native xmlto-native" SRC_URI = "git://github.com/dagwieers/dstat.git"
Signature · 1 line
2.12.2
PATCH 29/32 mg: Upgrade to 20170401 release
In reply to Khem RajFix musl build along the way
---
...001-Undefine-REGEX-for-musl-based-systems.patch | 39 ++++++++++++++++++++++
...-fileio-Include-sys-param.h-for-MAXNAMLEN.patch | 25 ++++++++++++++
...Define-DEFFILEMODE-if-platform-is-missing.patch | 28 ++++++++++++++++
.../mg/{mg_20161005.bb => mg_20170401.bb} | 12 +++++--
4 files changed, 101 insertions(+), 3 deletions(-)
create mode 100644 meta-oe/recipes-support/mg/mg/0001-Undefine-REGEX-for-musl-based-systems.patch
create mode 100644 meta-oe/recipes-support/mg/mg/0001-fileio-Include-sys-param.h-for-MAXNAMLEN.patch
create mode 100644 meta-oe/recipes-support/mg/mg/0002-fileio-Define-DEFFILEMODE-if-platform-is-missing.patch
rename meta-oe/recipes-support/mg/{mg_20161005.bb => mg_20170401.bb} (63%)meta-oe/recipes-support/mg/mg/0001-Undefine-REGEX-for-musl-based-systems.patch new file +39 -0
@@ -0,0 +1,39 @@ +From a370ccd9447752c555aeca04f64021efedde4db3 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Fri, 7 Apr 2017 17:16:19 -0700 +Subject: [PATCH] Undefine REGEX for musl based systems + +Signed-off-by: Khem Raj <[email protected]> +--- + GNUmakefile | 1 - + Makefile | 2 +- + 2 files changed, 1 insertion(+), 2 deletions(-) + +diff --git a/GNUmakefile b/GNUmakefile +index 7bf7dca..0e10030 100644 +--- a/GNUmakefile ++++ b/GNUmakefile +@@ -41,7 +41,6 @@ endif + CC?= gcc + CFLAGS?= -O2 -pipe + CFLAGS+= -g -Wall +-CPPFLAGS= -DREGEX + CPPFLAGS+= -D_GNU_SOURCE + CPPFLAGS+= $(BSD_CPPFLAGS) -D__dead=__dead2 + LIBS= $(CURSES_LIBS) $(BSD_LIBS) +diff --git a/Makefile b/Makefile +index 94ce340..d516bbc 100644 +--- a/Makefile ++++ b/Makefile +@@ -10,7 +10,7 @@ DPADD+= ${LIBCURSES} ${LIBUTIL} + # REGEX -- create regular expression functions. + # STARTUPFILE -- look for and handle initialization file. + # +-CFLAGS+=-Wall -DREGEX ++CFLAGS+=-Wall + + SRCS= autoexec.c basic.c bell.c buffer.c cinfo.c dir.c display.c \ + echo.c extend.c file.c fileio.c funmap.c help.c kbd.c keymap.c \ +-- +2.12.2 +
meta-oe/recipes-support/mg/mg/0001-fileio-Include-sys-param.h-for-MAXNAMLEN.patch new file +25 -0
@@ -0,0 +1,25 @@ +From 51539bcd2ee9f765595c0be16eebc1daee112b27 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Fri, 7 Apr 2017 16:52:59 -0700 +Subject: [PATCH 1/2] fileio: Include sys/param.h for MAXNAMLEN + +Signed-off-by: Khem Raj <[email protected]> +--- + fileio.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/fileio.c b/fileio.c +index 48a67a2..9b69665 100644 +--- a/fileio.c ++++ b/fileio.c +@@ -12,6 +12,7 @@ + #include <sys/time.h> + #include <sys/types.h> + #include <sys/wait.h> ++#include <sys/param.h> + #include <dirent.h> + #include <errno.h> + #include <fcntl.h> +-- +2.12.2 +
meta-oe/recipes-support/mg/mg/0002-fileio-Define-DEFFILEMODE-if-platform-is-missing.patch new file +28 -0
@@ -0,0 +1,28 @@ +From ce24a29cabb8f1774d262e120e5764a2afeb3825 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Fri, 7 Apr 2017 16:53:49 -0700 +Subject: [PATCH 2/2] fileio: Define DEFFILEMODE if platform is missing + +Signed-off-by: Khem Raj <[email protected]> +--- + fileio.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/fileio.c b/fileio.c +index 9b69665..a852fd2 100644 +--- a/fileio.c ++++ b/fileio.c +@@ -28,6 +28,10 @@ + #include "kbd.h" + #include "pathnames.h" + ++#if !defined(DEFFILEMODE) ++# define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)/* 0666*/ ++#endif ++ + static char *bkuplocation(const char *); + static int bkupleavetmp(const char *); + +-- +2.12.2 +
meta-oe/recipes-support/mg/mg_20170401.bb renamed from meta-oe/recipes-support/mg/mg_20161005.bb +9 -3
@@ -5,9 +5,15 @@ LIC_FILES_CHKSUM = "file://version.c;md5=1895eb37bf6bd79cdc5c89d8166fabfb" DEPENDS = "ncurses libbsd" SECTION = "console/editors" -SRC_URI = "http://homepage.boetes.org/software/mg/mg-${PV}.tar.gz" -SRC_URI[md5sum] = "fc6faeeee7308bb46f3512b75867ed51" -SRC_URI[sha256sum] = "b7fcb5136a6783ca24c8463ab0852fc1f26bdb2bb1c24759b2c51ccfc46c5e61" +SRC_URI = "http://homepage.boetes.org/software/mg/mg-${PV}.tar.gz \ + file://0001-fileio-Include-sys-param.h-for-MAXNAMLEN.patch \ + file://0002-fileio-Define-DEFFILEMODE-if-platform-is-missing.patch \ + " +SRC_URI_append_libc-musl = "\ + file://0001-Undefine-REGEX-for-musl-based-systems.patch \ + " +SRC_URI[md5sum] = "884388589fb38c2109ad9fed328be20a" +SRC_URI[sha256sum] = "0a3608b17c153960cb1d954ca3b62445a77c0c1a18aa5c8c58aba9f6b8d62aab" # CFLAGS isn't in EXTRA_OEMAKE, as the makefile picks it up via ?= EXTRA_OEMAKE = "\
Signature · 1 line
2.12.2
PATCH 30/32 lirc: update to 0.9.4d
In reply to Khem Raj---
meta-oe/recipes-connectivity/lirc/lirc.inc | 2 +-
...crcd-Mark-local-inline-funtions-as-static.patch | 49 ----------
.../recipes-connectivity/lirc/lirc/pollfd.patch | 101 +++++++++++++++++++++
.../lirc/{lirc_0.9.2.bb => lirc_0.9.4d.bb} | 7 +-
4 files changed, 106 insertions(+), 53 deletions(-)
delete mode 100644 meta-oe/recipes-connectivity/lirc/lirc/0001-lircrcd-Mark-local-inline-funtions-as-static.patch
create mode 100644 meta-oe/recipes-connectivity/lirc/lirc/pollfd.patch
rename meta-oe/recipes-connectivity/lirc/{lirc_0.9.2.bb => lirc_0.9.4d.bb} (92%)meta-oe/recipes-connectivity/lirc/lirc.inc +1 -1
@@ -6,7 +6,7 @@ DESCRIPTION_append_lirc-nslu2example = " This package contains a working config HOMEPAGE = "http://www.lirc.org" SECTION = "console/network" LICENSE = "GPLv2" -DEPENDS = "alsa-lib libftdi libusb1 libusb-compat jack portaudio-v19" +DEPENDS = "libxslt-native alsa-lib libftdi libusb1 libusb-compat jack portaudio-v19" SRC_URI = "http://prdownloads.sourceforge.net/lirc/lirc-${PV}.tar.bz2"
meta-oe/recipes-connectivity/lirc/lirc/0001-lircrcd-Mark-local-inline-funtions-as-static.patch deleted +0 -49
49 lines not on this page · raw message
meta-oe/recipes-connectivity/lirc/lirc/pollfd.patch new file +101 -0
101 lines not on this page · raw message
meta-oe/recipes-connectivity/lirc/lirc_0.9.4d.bb renamed from meta-oe/recipes-connectivity/lirc/lirc_0.9.2.bb +4 -3
@@ -1,7 +1,7 @@ require lirc.inc SRC_URI += " \ - file://0001-lircrcd-Mark-local-inline-funtions-as-static.patch \ + file://pollfd.patch \ file://lircd.service \ file://lircd.init \ file://lircexec.init \
@@ -11,8 +11,8 @@ SRC_URI += " \ " #file://0001-Adaptation-for-STM-configuration.patch \ # -SRC_URI[md5sum] = "3afc84e79c0839823cc20e7a710dd06d" -SRC_URI[sha256sum] = "4e3f948fcdee6dce009171143f0cb7cd7be48593dd58138db4101a41f651a1dd" +SRC_URI[md5sum] = "0d11679cbdd94a5a6da00a8e7231b4bf" +SRC_URI[sha256sum] = "c68f18c35b489b865c0a741d119b136e8702191538cd3551b977a7af6c4e41ab" SYSTEMD_PACKAGES = "lirc" SYSTEMD_SERVICE_${PN} = "lircd.service lircmd.service"
@@ -27,6 +27,7 @@ PACKAGECONFIG ?= " \ ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', ' systemd', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', ' x11', '', d)} \ " +CACHED_CONFIGUREVARS = "HAVE_WORKING_POLL=yes" #EXTRA_OEMAKE = 'SUBDIRS="lib daemons tools"' do_install_append() {
Signature · 1 line
2.12.2
PATCH 31/32 gtksourceview2: Fix build with clang
In reply to Khem Raj--- ...et.c-fix-non-literal-format-string-issues.patch | 31 ++++++++++++++++++++++ .../gtksourceview/gtksourceview2_2.10.5.bb | 3 ++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 meta-gnome/recipes-gnome/gtksourceview/gtksourceview2/0001-test-widget.c-fix-non-literal-format-string-issues.patch
meta-gnome/recipes-gnome/gtksourceview/gtksourceview2/0001-test-widget.c-fix-non-literal-format-string-issues.patch new file +31 -0
@@ -0,0 +1,31 @@ +From 0781b218beb8ba160ea223ff3d74a4fa2abf86fa Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Thu, 13 Apr 2017 16:21:14 -0700 +Subject: [PATCH] test-widget.c: fix non-literal format string issues + +clang errors out when using -Werror=format-nonliteral +since the definition of g_strdup_vprintf() from glib-2.0 +is using va_list and clang seems to still warn where as +gcc doesn't do that for va_list arguments + +Signed-off-by: Khem Raj <[email protected]> +--- + tests/test-widget.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/test-widget.c b/tests/test-widget.c +index 46f5f4e..3f2e60f 100644 +--- a/tests/test-widget.c ++++ b/tests/test-widget.c +@@ -260,7 +260,7 @@ static const gchar *buffer_ui_description = + + /* File loading code ----------------------------------------------------------------- */ + +-static void ++static void G_GNUC_PRINTF (2, 0) + error_dialog (GtkWindow *parent, const gchar *msg, ...) + { + va_list ap; +-- +2.12.2 +
meta-gnome/recipes-gnome/gtksourceview/gtksourceview2_2.10.5.bb +2 -1
@@ -18,7 +18,8 @@ REQUIRED_DISTRO_FEATURES = "x11" SRC_URI = "${GNOME_MIRROR}/${PNAME}/${@gnome_verdir("${PV}")}/${PNAME}-${PV}.tar.bz2;name=archive \ file://gtk-doc.make \ file://suppress-string-format-literal-warning.patch \ -" + file://0001-test-widget.c-fix-non-literal-format-string-issues.patch \ + " SRC_URI[archive.md5sum] = "1219ad1694df136f126507466aeb41aa" SRC_URI[archive.sha256sum] = "c585773743b1df8a04b1be7f7d90eecdf22681490d6810be54c81a7ae152191e"
Signature · 1 line
2.12.2
PATCH 32/32 python-lxml, python3-lxml: Fix libxslt format warnings
In reply to Khem RajFound with clang
--- ...01-lxml.etree-Add-empty-variadic-argument.patch | 40 ++++++++++++++++++++++ .../recipes-devtools/python/python-lxml_3.7.3.bb | 4 +++ ...01-lxml.etree-Add-empty-variadic-argument.patch | 40 ++++++++++++++++++++++ .../recipes-devtools/python/python3-lxml_3.7.3.bb | 4 +++ 4 files changed, 88 insertions(+) create mode 100644 meta-python/recipes-devtools/python/python-lxml/0001-lxml.etree-Add-empty-variadic-argument.patch create mode 100644 meta-python/recipes-devtools/python/python3-lxml/0001-lxml.etree-Add-empty-variadic-argument.patch
meta-python/recipes-devtools/python/python-lxml/0001-lxml.etree-Add-empty-variadic-argument.patch new file +40 -0
@@ -0,0 +1,40 @@ +From f8d2c3394767025b3b27b71248b3ecb50480cde7 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Thu, 13 Apr 2017 17:10:45 -0700 +Subject: [PATCH] lxml.etree: Add empty variadic argument + +format checker says that argument 4 is a printf formatted argument +but there is no more arguments to follow + +Fixes libxslt format warnings + +Signed-off-by: Khem Raj <[email protected]> +--- + src/lxml/lxml.etree.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/lxml/lxml.etree.c b/src/lxml/lxml.etree.c +index d482091..faab06c 100644 +--- a/src/lxml/lxml.etree.c ++++ b/src/lxml/lxml.etree.c +@@ -186086,7 +186086,7 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p + * except: + */ + __pyx_t_26 = __Pyx_PyObject_AsString(__pyx_v_message); if (unlikely((!__pyx_t_26) && PyErr_Occurred())) __PYX_ERR(19, 228, __pyx_L18_except_error) +- xsltTransformError(__pyx_v_c_ctxt, NULL, __pyx_v_c_inst_node, __pyx_t_26); ++ xsltTransformError(__pyx_v_c_ctxt, NULL, __pyx_v_c_inst_node, __pyx_t_26, ""); + + /* "src/lxml/xsltext.pxi":229 + * c_inst_node.name, _cstr(e)) +@@ -186136,7 +186136,7 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p + * except: + */ + __pyx_t_26 = __Pyx_PyObject_AsString(__pyx_v_message); if (unlikely((!__pyx_t_26) && PyErr_Occurred())) __PYX_ERR(19, 234, __pyx_L18_except_error) +- xsltTransformError(__pyx_v_c_ctxt, NULL, __pyx_v_c_inst_node, __pyx_t_26); ++ xsltTransformError(__pyx_v_c_ctxt, NULL, __pyx_v_c_inst_node, __pyx_t_26, ""); + + /* "src/lxml/xsltext.pxi":235 + * "Error executing extension element '%s'", c_inst_node.name) +-- +2.12.2 +
meta-python/recipes-devtools/python/python-lxml_3.7.3.bb +4 -0
@@ -1,2 +1,6 @@ inherit setuptools require python-lxml.inc + +SRC_URI = "${PYPI_SRC_URI} \ + file://0001-lxml.etree-Add-empty-variadic-argument.patch \ + "
meta-python/recipes-devtools/python/python3-lxml/0001-lxml.etree-Add-empty-variadic-argument.patch new file +40 -0
@@ -0,0 +1,40 @@ +From 36e64cf2f0676ee422c1fd41456967f3015b2fa3 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Thu, 13 Apr 2017 17:10:45 -0700 +Subject: [PATCH] lxml.etree: Add empty variadic argument + +format checker says that argument 4 is a printf formatted argument +but there is no more arguments to follow + +Fixes libxslt format warnings + +Signed-off-by: Khem Raj <[email protected]> +--- + src/lxml/lxml.etree.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/lxml/lxml.etree.c b/src/lxml/lxml.etree.c +index d482091..faab06c 100644 +--- a/src/lxml/lxml.etree.c ++++ b/src/lxml/lxml.etree.c +@@ -186086,7 +186086,7 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p + * except: + */ + __pyx_t_26 = __Pyx_PyObject_AsString(__pyx_v_message); if (unlikely((!__pyx_t_26) && PyErr_Occurred())) __PYX_ERR(19, 228, __pyx_L18_except_error) +- xsltTransformError(__pyx_v_c_ctxt, NULL, __pyx_v_c_inst_node, __pyx_t_26); ++ xsltTransformError(__pyx_v_c_ctxt, NULL, __pyx_v_c_inst_node, __pyx_t_26, ""); + + /* "src/lxml/xsltext.pxi":229 + * c_inst_node.name, _cstr(e)) +@@ -186136,7 +186136,7 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p + * except: + */ + __pyx_t_26 = __Pyx_PyObject_AsString(__pyx_v_message); if (unlikely((!__pyx_t_26) && PyErr_Occurred())) __PYX_ERR(19, 234, __pyx_L18_except_error) +- xsltTransformError(__pyx_v_c_ctxt, NULL, __pyx_v_c_inst_node, __pyx_t_26); ++ xsltTransformError(__pyx_v_c_ctxt, NULL, __pyx_v_c_inst_node, __pyx_t_26, ""); + + /* "src/lxml/xsltext.pxi":235 + * "Error executing extension element '%s'", c_inst_node.name) +-- +2.12.2 +
meta-python/recipes-devtools/python/python3-lxml_3.7.3.bb +4 -0
@@ -1,2 +1,6 @@ inherit setuptools3 require python-lxml.inc + +SRC_URI = "${PYPI_SRC_URI} \ + file://0001-lxml.etree-Add-empty-variadic-argument.patch \ + "
Signature · 1 line
2.12.2
Khem,
Why is this being included? I thought you and Martin saw issues?
- armin
Quoted 272 lines · Khem Raj
From: Armin Kuster <[email protected]>
Update to pick up 4.10 and below kernel patches. Change LICENSE to reflect changes noted by the maintainer adapt to makefile changes for module install dest location fix compile issues do to gcc 6.x
remove unneeded patchesSigned-off-by Armin Kuster <[email protected]>--- .../recipes-kernel/netmap/files/gcc_6_fix.patch | 170 +++++++++++++++++++++ .../recipes-kernel/netmap/netmap-modules_git.bb | 9 +- meta-networking/recipes-kernel/netmap/netmap.inc | 8 +- .../recipes-kernel/netmap/netmap_git.bb | 8 +- 4 files changed, 182 insertions(+), 13 deletions(-)create mode 100644
meta-networking/recipes-kernel/netmap/files/gcc_6_fix.patchmeta-networking/recipes-kernel/netmap/files/gcc_6_fix.patch new file +170
-0@@ -0,0 +1,170 @@ +Fix build issues do to gcc 6.x + +Upstream-Status: Pending + +loads of error: format '%lu' expects argument of type 'long unsigned int', but argument 7 has type 'long long unsigned int' + +and error: left shift count >= width of type [-Werror=shift-count-overflow] + +Signed-off-by: Armin Kuster <[email protected]> + +Index: git/apps/lb/lb.c +=================================================================== +--- git.orig/apps/lb/lb.c ++++ git/apps/lb/lb.c +@@ -935,7 +935,7 @@ run: + if (hash == 0) { + non_ip++; // XXX ?? + } +- rs->ptr = hash | (1UL << 32); ++ rs->ptr = hash | (1ULL << 32); + // prefetch the buffer for the next round + next_cur = nm_ring_next(rxring, next_cur); + next_slot = &rxring->slot[next_cur]; +Index: git/apps/tlem/tlem.c +=================================================================== +--- git.orig/apps/tlem/tlem.c ++++ git/apps/tlem/tlem.c +@@ -513,7 +513,7 @@ no_room(struct _qs *q) + q_reclaim(q); + if (q->prod_queued > q->qsize) { + q->prod_drop++; +- RD(1, "too many bytes queued %lu, drop %lu", ++ RD(1, "too many bytes queued %llu, drop %llu", + (_P64)q->prod_queued, (_P64)q->prod_drop); + return 1; + } +@@ -523,7 +523,7 @@ no_room(struct _qs *q) + h = q->prod_head = q->head; /* re-read head, just in case */ + /* repeat the test */ + if ((h <= t && new_t == 0 && h == 0) || (h > t && (new_t == 0 || new_t >= h)) ) { +- ND(1, "no room for insert h %ld t %ld new_t %ld", ++ ND(1, "no room for insert h %lld t %lld new_t %lld", + (_P64)h, (_P64)t, (_P64)new_t); + return 1; /* no room for insert */ + } +@@ -906,14 +906,14 @@ tlem_main(void *_a) + + q->buf = calloc(1, need); + if (q->buf == NULL) { +- ED("alloc %ld bytes for queue failed, exiting", (_P64)need); ++ ED("alloc %lld bytes for queue failed, exiting", (_P64)need); + nm_close(a->pa); + nm_close(a->pb); + return(NULL); + } + q->buflen = need; +- ED("----\n\t%s -> %s : bps %ld delay %s loss %s queue %ld bytes" +- "\n\tbuffer %lu bytes", ++ ED("----\n\t%s -> %s : bps %lld delay %s loss %s queue %lld bytes" ++ "\n\tbuffer %llu bytes", + q->prod_ifname, q->cons_ifname, + (_P64)q->max_bps, q->c_delay.optarg, q->c_loss.optarg, (_P64)q->qsize, + (_P64)q->buflen); +@@ -1258,7 +1258,7 @@ main(int argc, char **argv) + struct _qs *q0 = &bp[0].q, *q1 = &bp[1].q; + + sleep(1); +- ED("%ld -> %ld maxq %d round %ld, %ld <- %ld maxq %d round %ld", ++ ED("%lld -> %lld maxq %d round %lld, %lld <- %lld maxq %d round %lld", + (_P64)(q0->rx - olda.rx), (_P64)(q0->tx - olda.tx), + q0->rx_qmax, (_P64)q0->prod_max_gap, + (_P64)(q1->rx - oldb.rx), (_P64)(q1->tx - oldb.tx), +@@ -1553,7 +1553,7 @@ uniform_delay_parse(struct _qs *q, struc + dmax = parse_time(av[2]); + if (dmin == U_PARSE_ERR || dmax == U_PARSE_ERR || dmin > dmax) + return 1; +- D("dmin %ld dmax %ld", (_P64)dmin, (_P64)dmax); ++ D("dmin %lld dmax %lld", (_P64)dmin, (_P64)dmax); + dst->d[0] = dmin; + dst->d[1] = dmax; + dst->d[2] = dmax - dmin; +@@ -1618,7 +1618,7 @@ exp_delay_run(struct _qs *q, struct _cfg + { + uint64_t *t = (uint64_t *)arg->arg; + q->cur_delay = t[my_random24() & (PTS_D_EXP - 1)]; +- RD(5, "delay %lu", (_P64)q->cur_delay); ++ RD(5, "delay %llu", (_P64)q->cur_delay); + return 0; + } + +@@ -1777,7 +1777,7 @@ const_ber_parse(struct _qs *q, struct _c + plr[i] = mask; + #if 0 + if (i>= 60) // && plr[i] < mask/2) +- RD(50,"%4d: %le %ld", i, 1.0 - cur, (_P64)plr[i]); ++ RD(50,"%4d: %le %lld", i, 1.0 - cur, (_P64)plr[i]); + #endif + } + dst->d[0] = ber * (mask + 1); +Index: git/apps/nmreplay/nmreplay.c +=================================================================== +--- git.orig/apps/nmreplay/nmreplay.c ++++ git/apps/nmreplay/nmreplay.c +@@ -771,7 +771,7 @@ pcap_prod(void *_pa) + need = loops * pf->tot_bytes_rounded + sizeof(struct q_pkt); + q->buf = calloc(1, need); + if (q->buf == NULL) { +- D("alloc %ld bytes for queue failed, exiting",(_P64)need); ++ D("alloc %lld bytes for queue failed, exiting",(_P64)need); + goto fail; + } + q->prod_head = q->prod_tail = 0; +@@ -1261,7 +1261,7 @@ main(int argc, char **argv) + struct _qs *q0 = &bp[0].q; + + sleep(1); +- ED("%ld -> %ld maxq %d round %ld", ++ ED("%lld -> %lld maxq %d round %lld", + (_P64)(q0->rx - olda.rx), (_P64)(q0->tx - olda.tx), + q0->rx_qmax, (_P64)q0->prod_max_gap + ); +@@ -1529,7 +1529,7 @@ uniform_delay_parse(struct _qs *q, struc + dmax = parse_time(av[2]); + if (dmin == U_PARSE_ERR || dmax == U_PARSE_ERR || dmin > dmax) + return 1; +- D("dmin %ld dmax %ld", (_P64)dmin, (_P64)dmax); ++ D("dmin %lld dmax %lld", (_P64)dmin, (_P64)dmax); + dst->d[0] = dmin; + dst->d[1] = dmax; + dst->d[2] = dmax - dmin; +@@ -1592,7 +1592,7 @@ exp_delay_run(struct _qs *q, struct _cfg + { + uint64_t *t = (uint64_t *)arg->arg; + q->cur_delay = t[my_random24() & (PTS_D_EXP - 1)]; +- RD(5, "delay %lu", (_P64)q->cur_delay); ++ RD(5, "delay %llu", (_P64)q->cur_delay); + return 0; + } + +@@ -1783,7 +1783,7 @@ const_ber_parse(struct _qs *q, struct _c + plr[i] = mask; + #if 0 + if (i>= 60) // && plr[i] < mask/2) +- RD(50,"%4d: %le %ld", i, 1.0 - cur, (_P64)plr[i]); ++ RD(50,"%4d: %le %lld", i, 1.0 - cur, (_P64)plr[i]); + #endif + } + dst->d[0] = ber * (mask + 1); +Index: git/apps/pkt-gen/pkt-gen.c +=================================================================== +--- git.orig/apps/pkt-gen/pkt-gen.c ++++ git/apps/pkt-gen/pkt-gen.c +@@ -1319,7 +1319,7 @@ ping_body(void *data) + ts.tv_nsec += 1000000000; + ts.tv_sec--; + } +- if (0) D("seq %d/%lu delta %d.%09d", seq, sent, ++ if (0) D("seq %d/%llu delta %d.%09d", seq, sent, + (int)ts.tv_sec, (int)ts.tv_nsec); + t_cur = ts.tv_sec * 1000000000UL + ts.tv_nsec; + if (t_cur < t_min) +@@ -1401,7 +1401,7 @@ pong_body(void *data) + return NULL; + } + if (n > 0) +- D("understood ponger %lu but don't know how to do it", n); ++ D("understood ponger %llu but don't know how to do it", n); + while (!targ->cancel && (n == 0 || sent < n)) { + uint32_t txcur, txavail; + //#define BUSYWAITmeta-networking/recipes-kernel/netmap/netmap-modules_git.bb +6
-3@@ -13,6 +13,9 @@ EXTRA_OECONF = "--kernel-dir=${STAGING_KERNEL_BUILDDIR} \ --kernel-sources=${STAGING_KERNEL_DIR} \ --install-mod-path=${D} \ --driver-suffix="-netmap" \ + --cc='${CC}' \ + --ld='${LD}' \ + --no-apps \ " # The driver builds are optional, but for deterministic builds,@@ -85,8 +88,8 @@ do_compile () { do_install () { cd ${S}/LINUX - oe_runmake install + oe_runmake install DESTDIR=${D} } -# http://errors.yoctoproject.org/Errors/Details/83335/ -PNBLACKLIST[netmap-modules] ?= "BROKEN: not compatible with default kernel version 4.8 - the recipe will be removed on 2017-09-01 unless the issue is fixed" +FILES_${PN}-doc += "${prefix}/local/share" +FILES_${PN}-dev += "${prefix}/local/include"meta-networking/recipes-kernel/netmap/netmap.inc +4
-4@@ -2,15 +2,15 @@ SUMMARY = "netmap and VALE - very fast packet I/O from userspace (FreeBSD/Linux) DESCRIPTION= "NETMAP is a framework for very fast packet I/O from userspace. VALE is an equally fast in-kernel software switch using the netmap API. Both are implemented as a single kernel module for FreeBSD and Linux, and can deal with line rate on real or emulated 10 Gbit ports." SECTION = "networking" HOMEPAGE = "http://code.google.com/p/netmap/" -LICENSE = "GPLv2+" +LICENSE = "BSD-2-Clause" -LIC_FILES_CHKSUM = "file://README;beginline=13;endline=14;md5=56ae0b9c7ba0476ab9098de94c2714d6" +LIC_FILES_CHKSUM = "file://LICENSE;md5=388c13686fc84f281413c82fa325965f" -SRCREV = "da9e19e69b84e4f6f8ae125f8d01b42a4abade6a" +SRCREV = "86312f06626f33f150514eaab42a2d2a8432c4ed" PV = "master+git${SRCPV}" SRC_URI = "git://github.com/luigirizzo/netmap.git" -SRC_URI += "file://makefile_fixup.patch" +SRC_URI += "file://gcc_6_fix.patch" S = "${WORKDIR}/git"meta-networking/recipes-kernel/netmap/netmap_git.bb +2
-6@@ -7,12 +7,10 @@ EXTRA_OECONF = "--kernel-dir=${STAGING_KERNEL_BUILDDIR} \ --kernel-sources=${STAGING_KERNEL_DIR} \ --no-drivers \ --disable-generic \ - --prefix=${prefix} \ --destdir=${D} \ --cc='${CC}' \ --ld='${LD}' \ " -SRC_URI += "file://0001-testmmap-fix-compile-issue-with-gcc-5.x.patch" do_configure () { cd ${S}/LINUX@@ -29,9 +27,7 @@ do_install () { make install-apps DESTDIR=${D} } -FILES_${PN} += "${bindir}" +FILES_${PN} += "${prefix}/local/bin" +FILES_${PN}-doc += "${prefix}/local/share" RDEPENDS_${PN} = "kernel-module-netmap" RRECOMMENDS_${PN} = "kernel-module-netmap" - -# http://errors.yoctoproject.org/Errors/Details/69733/ -PNBLACKLIST[netmap] ?= "BROKEN: Tries to build kernel module and fails, either it should be disabled or there should be dependency on kernel like in netmap-modules - the recipe will be removed on 2017-09-01 unless the issue is fixed"
Quoted 5 lines · On Tue, Apr 18, 2017 at 5:39 PM, akuster808 <[email protected]> wrote:
Khem,
Why is this being included? I thought you and Martin saw issues?
ignore it. I just rebased my tree on master-next and this slipped through
Quoted 300 lines
- armin
Quoted 293 lines · Khem Raj
From: Armin Kuster <[email protected]>
Update to pick up 4.10 and below kernel patches. Change LICENSE to reflect changes noted by the maintainer adapt to makefile changes for module install dest location fix compile issues do to gcc 6.x
remove unneeded patchesSigned-off-by Armin Kuster <[email protected]>--- .../recipes-kernel/netmap/files/gcc_6_fix.patch | 170 +++++++++++++++++++++ .../recipes-kernel/netmap/netmap-modules_git.bb | 9 +- meta-networking/recipes-kernel/netmap/netmap.inc | 8 +- .../recipes-kernel/netmap/netmap_git.bb | 8 +- 4 files changed, 182 insertions(+), 13 deletions(-)create mode 100644
meta-networking/recipes-kernel/netmap/files/gcc_6_fix.patchmeta-networking/recipes-kernel/netmap/files/gcc_6_fix.patch new file +5
-0@@ -0,0 +1,170 @@ +Fix build issues do to gcc 6.x + +Upstream-Status: Pending + +loads of error: format '%lu' expects argument of type 'long unsignedint', but argument 7 has type 'long long unsigned int'
meta-networking/recipes-kernel/netmap/files/gcc_6_fix.patch new file +2
-0+ +and error: left shift count >= width of type[-Werror=shift-count-overflow]
meta-networking/recipes-kernel/netmap/files/gcc_6_fix.patch new file +33
-0+ +Signed-off-by: Armin Kuster <[email protected]> + +Index: git/apps/lb/lb.c +=================================================================== +--- git.orig/apps/lb/lb.c ++++ git/apps/lb/lb.c +@@ -935,7 +935,7 @@ run: + if (hash == 0) { + non_ip++; // XXX ?? + } +- rs->ptr = hash | (1UL << 32); ++ rs->ptr = hash | (1ULL << 32); + // prefetch the buffer for the next round + next_cur = nm_ring_next(rxring, next_cur); + next_slot = &rxring->slot[next_cur]; +Index: git/apps/tlem/tlem.c +=================================================================== +--- git.orig/apps/tlem/tlem.c ++++ git/apps/tlem/tlem.c +@@ -513,7 +513,7 @@ no_room(struct _qs *q) + q_reclaim(q); + if (q->prod_queued > q->qsize) { + q->prod_drop++; +- RD(1, "too many bytes queued %lu, drop %lu", ++ RD(1, "too many bytes queued %llu, drop %llu", + (_P64)q->prod_queued, (_P64)q->prod_drop); + return 1; + } +@@ -523,7 +523,7 @@ no_room(struct _qs *q) + h = q->prod_head = q->head; /* re-read head, just in case */ + /* repeat the test */ + if ((h <= t && new_t == 0 && h == 0) || (h > t && (new_t == 0 ||
new_t>= h)) ) {+- ND(1, "no room for insert h %ld t %ld new_t %ld", ++ ND(1, "no room for insert h %lld t %lld new_t %lld",meta-networking/recipes-kernel/netmap/files/gcc_6_fix.patch new file +20
-0+ (_P64)h, (_P64)t, (_P64)new_t); + return 1; /* no room for insert */ + } +@@ -906,14 +906,14 @@ tlem_main(void *_a) + + q->buf = calloc(1, need); + if (q->buf == NULL) { +- ED("alloc %ld bytes for queue failed, exiting", (_P64)need); ++ ED("alloc %lld bytes for queue failed, exiting", (_P64)need); + nm_close(a->pa); + nm_close(a->pb); + return(NULL); + } + q->buflen = need; +- ED("----\n\t%s -> %s : bps %ld delay %s loss %s queue %ld bytes" +- "\n\tbuffer %lu bytes", ++ ED("----\n\t%s -> %s : bps %lld delay %s loss %s queue %lld bytes" ++ "\n\tbuffer %llu bytes", + q->prod_ifname, q->cons_ifname, + (_P64)q->max_bps, q->c_delay.optarg, q->c_loss.optarg,(_P64)q->qsize,
meta-networking/recipes-kernel/netmap/files/gcc_6_fix.patch new file +6
-0+ (_P64)q->buflen); +@@ -1258,7 +1258,7 @@ main(int argc, char **argv) + struct _qs *q0 = &bp[0].q, *q1 = &bp[1].q; + + sleep(1); +- ED("%ld -> %ld maxq %d round %ld, %ld <- %ld maxq %d round%ld",
++ ED("%lld -> %lld maxq %d round %lld, %lld <- %lld maxq %d
round %lld",meta-networking/recipes-kernel/netmap/files/gcc_6_fix.patch new file +27
-0+ (_P64)(q0->rx - olda.rx), (_P64)(q0->tx - olda.tx), + q0->rx_qmax, (_P64)q0->prod_max_gap, + (_P64)(q1->rx - oldb.rx), (_P64)(q1->tx - oldb.tx), +@@ -1553,7 +1553,7 @@ uniform_delay_parse(struct _qs *q, struc + dmax = parse_time(av[2]); + if (dmin == U_PARSE_ERR || dmax == U_PARSE_ERR || dmin > dmax) + return 1; +- D("dmin %ld dmax %ld", (_P64)dmin, (_P64)dmax); ++ D("dmin %lld dmax %lld", (_P64)dmin, (_P64)dmax); + dst->d[0] = dmin; + dst->d[1] = dmax; + dst->d[2] = dmax - dmin; +@@ -1618,7 +1618,7 @@ exp_delay_run(struct _qs *q, struct _cfg + { + uint64_t *t = (uint64_t *)arg->arg; + q->cur_delay = t[my_random24() & (PTS_D_EXP - 1)]; +- RD(5, "delay %lu", (_P64)q->cur_delay); ++ RD(5, "delay %llu", (_P64)q->cur_delay); + return 0; + } + +@@ -1777,7 +1777,7 @@ const_ber_parse(struct _qs *q, struct _c + plr[i] = mask; + #if 0 + if (i>= 60) // && plr[i] < mask/2) +- RD(50,"%4d: %le %ld", i, 1.0 - cur, (_P64)plr[i]); ++ RD(50,"%4d: %le %lld", i, 1.0 - cur,(_P64)plr[i]);
+ #endifmeta-networking/recipes-kernel/netmap/files/gcc_6_fix.patch new file +48
-0+ } + dst->d[0] = ber * (mask + 1); +Index: git/apps/nmreplay/nmreplay.c +=================================================================== +--- git.orig/apps/nmreplay/nmreplay.c ++++ git/apps/nmreplay/nmreplay.c +@@ -771,7 +771,7 @@ pcap_prod(void *_pa) + need = loops * pf->tot_bytes_rounded + sizeof(struct q_pkt); + q->buf = calloc(1, need); + if (q->buf == NULL) { +- D("alloc %ld bytes for queue failed, exiting",(_P64)need); ++ D("alloc %lld bytes for queue failed, exiting",(_P64)need); + goto fail; + } + q->prod_head = q->prod_tail = 0; +@@ -1261,7 +1261,7 @@ main(int argc, char **argv) + struct _qs *q0 = &bp[0].q; + + sleep(1); +- ED("%ld -> %ld maxq %d round %ld", ++ ED("%lld -> %lld maxq %d round %lld", + (_P64)(q0->rx - olda.rx), (_P64)(q0->tx - olda.tx), + q0->rx_qmax, (_P64)q0->prod_max_gap + ); +@@ -1529,7 +1529,7 @@ uniform_delay_parse(struct _qs *q, struc + dmax = parse_time(av[2]); + if (dmin == U_PARSE_ERR || dmax == U_PARSE_ERR || dmin > dmax) + return 1; +- D("dmin %ld dmax %ld", (_P64)dmin, (_P64)dmax); ++ D("dmin %lld dmax %lld", (_P64)dmin, (_P64)dmax); + dst->d[0] = dmin; + dst->d[1] = dmax; + dst->d[2] = dmax - dmin; +@@ -1592,7 +1592,7 @@ exp_delay_run(struct _qs *q, struct _cfg + { + uint64_t *t = (uint64_t *)arg->arg; + q->cur_delay = t[my_random24() & (PTS_D_EXP - 1)]; +- RD(5, "delay %lu", (_P64)q->cur_delay); ++ RD(5, "delay %llu", (_P64)q->cur_delay); + return 0; + } + +@@ -1783,7 +1783,7 @@ const_ber_parse(struct _qs *q, struct _c + plr[i] = mask; + #if 0 + if (i>= 60) // && plr[i] < mask/2) +- RD(50,"%4d: %le %ld", i, 1.0 - cur, (_P64)plr[i]); ++ RD(50,"%4d: %le %lld", i, 1.0 - cur,(_P64)plr[i]);
+ #endifmeta-networking/recipes-kernel/netmap/files/gcc_6_fix.patch new file +11
-0+ } + dst->d[0] = ber * (mask + 1); +Index: git/apps/pkt-gen/pkt-gen.c +=================================================================== +--- git.orig/apps/pkt-gen/pkt-gen.c ++++ git/apps/pkt-gen/pkt-gen.c +@@ -1319,7 +1319,7 @@ ping_body(void *data) + ts.tv_nsec += 1000000000; + ts.tv_sec--; + } +- if (0) D("seq %d/%lu delta %d.%09d", seq,sent,
++ if (0) D("seq %d/%llu delta %d.%09d", seq,
sent,meta-networking/recipes-kernel/netmap/files/gcc_6_fix.patch new file +2
-0+ (int)ts.tv_sec, (int)ts.tv_nsec); + t_cur = ts.tv_sec * 1000000000UL +ts.tv_nsec;
meta-networking/recipes-kernel/netmap/files/gcc_6_fix.patch new file +7
-0+ if (t_cur < t_min) +@@ -1401,7 +1401,7 @@ pong_body(void *data) + return NULL; + } + if (n > 0) +- D("understood ponger %lu but don't know how to do it", n); ++ D("understood ponger %llu but don't know how to do it",n);
meta-networking/recipes-kernel/netmap/files/gcc_6_fix.patch new file +3
-0+ while (!targ->cancel && (n == 0 || sent < n)) { + uint32_t txcur, txavail; + //#define BUSYWAITmeta-networking/recipes-kernel/netmap/netmap-modules_git.bb +4
-2@@ -13,6 +13,9 @@ EXTRA_OECONF = "--kernel-dir=${STAGING_KERNEL_BUILDDIR} \ --kernel-sources=${STAGING_KERNEL_DIR} \ --install-mod-path=${D} \ --driver-suffix="-netmap" \ + --cc='${CC}' \ + --ld='${LD}' \ + --no-apps \ " # The driver builds are optional, but for deterministic builds,@@ -85,8 +88,8 @@ do_compile () { do_install () { cd ${S}/LINUX - oe_runmake install + oe_runmake install DESTDIR=${D} } -# http://errors.yoctoproject.org/Errors/Details/83335/ -PNBLACKLIST[netmap-modules] ?= "BROKEN: not compatible with defaultkernel version 4.8 - the recipe will be removed on 2017-09-01 unless the issue is fixed"
meta-networking/recipes-kernel/netmap/netmap-modules_git.bb +2
-0+FILES_${PN}-doc += "${prefix}/local/share" +FILES_${PN}-dev += "${prefix}/local/include"meta-networking/recipes-kernel/netmap/netmap.inc +0
-0@@ -2,15 +2,15 @@ SUMMARY = "netmap and VALE - very fast packet I/O from userspace (FreeBSD/Linux) DESCRIPTION= "NETMAP is a framework for very fast packet I/O fromuserspace. VALE is an equally fast in-kernel software switch using the netmap API. Both are implemented as a single kernel module for FreeBSD and Linux, and can deal with line rate on real or emulated 10 Gbit ports."
SECTION = "networking"
HOMEPAGE = "http://code.google.com/p/netmap/"meta-networking/recipes-kernel/netmap/netmap.inc +1
-1-LICENSE = "GPLv2+" +LICENSE = "BSD-2-Clause" -LIC_FILES_CHKSUM ="file://README;beginline=13;endline=14;md5=56ae0b9c7ba0476ab9098de94c2714d6"
meta-networking/recipes-kernel/netmap/netmap.inc +3
-1+LIC_FILES_CHKSUM = "file://LICENSE;md5=388c13686fc84f281413c82fa325965f" -SRCREV = "da9e19e69b84e4f6f8ae125f8d01b42a4abade6a" +SRCREV = "86312f06626f33f150514eaab42a2d2a8432c4ed" PV = "master+git${SRCPV}" SRC_URI = "git://github.com/luigirizzo/netmap.git" -SRC_URI += "file://makefile_fixup.patch" +SRC_URI += "file://gcc_6_fix.patch" S = "${WORKDIR}/git" diff --git a/meta-networking/recipes-kernel/netmap/netmap_git.bbb/meta-networking/recipes-kernel/netmap/netmap_git.bb index
2d8509c74..7eb5148f6100644meta-networking/recipes-kernel/netmap/netmap_git.bb +2
-5@@ -7,12 +7,10 @@ EXTRA_OECONF = "--kernel-dir=${STAGING_KERNEL_BUILDDIR} \ --kernel-sources=${STAGING_KERNEL_DIR} \ --no-drivers \ --disable-generic \ - --prefix=${prefix} \ --destdir=${D} \ --cc='${CC}' \ --ld='${LD}' \ " -SRC_URI += "file://0001-testmmap-fix-compile-issue-with-gcc-5.x.patch" do_configure () { cd ${S}/LINUX@@ -29,9 +27,7 @@ do_install () { make install-apps DESTDIR=${D} } -FILES_${PN} += "${bindir}" +FILES_${PN} += "${prefix}/local/bin" +FILES_${PN}-doc += "${prefix}/local/share" RDEPENDS_${PN} = "kernel-module-netmap" RRECOMMENDS_${PN} = "kernel-module-netmap" - -# http://errors.yoctoproject.org/Errors/Details/69733/ -PNBLACKLIST[netmap] ?= "BROKEN: Tries to build kernel module and fails,either it should be disabled or there should be dependency on kernel like in netmap-modules - the recipe will be removed on 2017-09-01 unless the issue is fixed"
Re: [meta-oe][ 27/32] mosh: Upgrade to 1.3.0
In reply to Khem RajI sent the series but its not showing up in patchwork again, I have no idea whats going on. Meanwhile you can cherry-pick them from
https://github.com/kraj/meta-openembedded/tree/kraj/master
Quoted 28 lines · Khem Raj
Signed-off-by Khem Raj <[email protected]>--- meta-oe/recipes-connectivity/mosh/{mosh_1.2.4.bb => mosh_1.3.0.bb} | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) rename meta-oe/recipes-connectivity/mosh/{mosh_1.2.4.bb => mosh_1.3.0.bb} (93%)meta-oe/recipes-connectivity/mosh/mosh_1.3.0.bb renamed from meta-oe/recipes-connectivity/mosh/mosh_1.2.4.bb +2
-4@@ -15,9 +15,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" DEPENDS = "protobuf-native protobuf ncurses zlib libio-pty-perl openssl libutempter" SRC_URI = "http://mosh.mit.edu/mosh-${PV}.tar.gz" - -SRC_URI[md5sum] = "c2d918f4d91fdc32546e2e089f9281b2" -SRC_URI[sha256sum] = "e74d0d323226046e402dd469a176075fc2013b69b0e67cea49762c957175df46" +SRC_URI[md5sum] = "d961276995936953bf2d5a794068b076" +SRC_URI[sha256sum] = "320e12f461e55d71566597976bd9440ba6c5265fa68fbf614c6f1c8401f93376" inherit autotools pkgconfig --2.12.2
Re: [meta-oe][ 27/32] mosh: Upgrade to 1.3.0
OK, I took it from there. There were 2 more patches in that branch:
pick 58ec00043 ne10: Fix build errors on cortex-a7 cpus
pick 49de0a778 live555: Update from 20130430 to 20170410 which I haven't seen on ML, will keep them for next build, but if you want them to be applied send them to ML as well.
Jose: can you please check why patchwork didn't pick this series (twice)?
Thanks
Quoted 47 lines · Khem Raj
I sent the series but its not showing up in patchwork again, I have no idea whats going on. Meanwhile you can cherry-pick them from
https://github.com/kraj/meta-openembedded/tree/kraj/master
Quoted 3 lines · Khem Raj
Signed-off-by Khem Raj <[email protected]>--- meta-oe/recipes-connectivity/mosh/{mosh_1.2.4.bb => mosh_1.3.0.bb} | 5++---
Quoted 2 lines
1 file changed, 2 insertions(+), 3 deletions(-) rename meta-oe/recipes-connectivity/mosh/{mosh_1.2.4.bb =>mosh_1.3.0.bb} (93%)
Review
Quoted 2 lines
(quoted diff) +0
-0b/meta-oe/recipes-connectivity/mosh/mosh_1.3.0.bb
meta-oe/recipes-connectivity/mosh/mosh_1.3.0.bb LIC_FILES_CHKSUM = "file://COPYING;md5=
Quoted 7 lines
similarity index 93%
rename from meta-oe/recipes-connectivity/mosh/mosh_1.2.4.bb rename to meta-oe/recipes-connectivity/mosh/mosh_1.3.0.bb indexe4d5b69bc..9fc8435ee100644meta-oe/recipes-connectivity/mosh/mosh_1.3.0.bb renamed from meta-oe/recipes-connectivity/mosh/mosh_1.2.4.bb +0
-0@@ -15,9 +15,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=
d32239bcb673463ab874e80d47fae504"meta-oe/recipes-connectivity/mosh/mosh_1.3.0.bb LIC_FILES_CHKSUM = "file://COPYING;md5= · line 15
Quoted 1 line
meta-oe/recipes-connectivity/mosh/mosh_1.3.0.bb renamed from meta-oe/recipes-connectivity/mosh/mosh_1.2.4.bb +0
-0DEPENDS = "protobuf-native protobuf ncurses zlib libio-pty-perl openssllibutempter"
meta-oe/recipes-connectivity/mosh/mosh_1.3.0.bb LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
Quoted 5 lines
meta-oe/recipes-connectivity/mosh/mosh_1.3.0.bb renamed from meta-oe/recipes-connectivity/mosh/mosh_1.2.4.bb +0
-3SRC_URI = "http://mosh.mit.edu/mosh-${PV}.tar.gz" - -SRC_URI[md5sum] = "c2d918f4d91fdc32546e2e089f9281b2" -SRC_URI[sha256sum] = "e74d0d323226046e402dd469a17607
5fc2013b69b0e67cea49762c957175df46"meta-oe/recipes-connectivity/mosh/mosh_1.3.0.bb LIC_FILES_CHKSUM = "file://COPYING;md5= · line 18
Quoted 2 lines
meta-oe/recipes-connectivity/mosh/mosh_1.3.0.bb renamed from meta-oe/recipes-connectivity/mosh/mosh_1.2.4.bb +2
-0+SRC_URI[md5sum] = "d961276995936953bf2d5a794068b076" +SRC_URI[sha256sum] = "320e12f461e55d71566597976bd944
0ba6c5265fa68fbf614c6f1c8401f93376"Quoted 6 lines
meta-oe/recipes-connectivity/mosh/mosh_1.3.0.bb renamed from meta-oe/recipes-connectivity/mosh/mosh_1.2.4.bb +0
-1inherit autotools pkgconfig --2.12.2
--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
Re: [meta-oe][ 27/32] mosh: Upgrade to 1.3.0
Quoted 3 lines · Martin Jansa
OK, I took it from there. There were 2 more patches in that branch:
pick58ec00043ne10: Fix build errors on cortex-a7 cpus pick49de0a778live555: Update from 20130430 to 20170410
yes right. New fixes that are ready to be upstreamed keep appearing there
Quoted 3 lines
which I haven't seen on ML, will keep them for next build, but if you want them to be applied send them to ML as well.
sent
Quoted 55 lines
Jose: can you please check why patchwork didn't pick this series (twice)?
Thanks
Quoted 47 lines · Khem Raj
I sent the series but its not showing up in patchwork again, I have no idea whats going on. Meanwhile you can cherry-pick them from
https://github.com/kraj/meta-openembedded/tree/kraj/master
Quoted 30 lines · Khem Raj
Signed-off-by Khem Raj <[email protected]>--- meta-oe/recipes-connectivity/mosh/{mosh_1.2.4.bb => mosh_1.3.0.bb} | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) rename meta-oe/recipes-connectivity/mosh/{mosh_1.2.4.bb =>mosh_1.3.0.bb} (93%)
meta-oe/recipes-connectivity/mosh/mosh_1.3.0.bb renamed from meta-oe/recipes-connectivity/mosh/mosh_1.2.4.bb +0
-0@@ -15,9 +15,8 @@ LIC_FILES_CHKSUM ="file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
DEPENDS = "protobuf-native protobuf ncurses zlib libio-pty-perl openssl
libutempter"
SRC_URI= "http://mosh.mit.edu/mosh-${PV}.tar.gz"meta-oe/recipes-connectivity/mosh/mosh_1.3.0.bb renamed from meta-oe/recipes-connectivity/mosh/mosh_1.2.4.bb +0
-3- -SRC_URI[md5sum] = "c2d918f4d91fdc32546e2e089f9281b2" -SRC_URI[sha256sum] ="
e74d0d323226046e402dd469a176075fc2013b69b0e67cea49762c957175df46"meta-oe/recipes-connectivity/mosh/mosh_1.3.0.bb renamed from meta-oe/recipes-connectivity/mosh/mosh_1.2.4.bb +2
-0+SRC_URI[md5sum] = "d961276995936953bf2d5a794068b076" +SRC_URI[sha256sum] ="
320e12f461e55d71566597976bd9440ba6c5265fa68fbf614c6f1c8401f93376"Quoted 5 lines
inherit autotools pkgconfig
--
2.12.2--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
Re: [meta-oe][ 30/32] lirc: update to 0.9.4d
In reply to Khem Rajlirc-0.9.4d: lirc: Files/directories were installed but not shipped in any package:
/lib/systemd/system/lircd-setup.service /lib/systemd/system/lircd-uinput.service /lib/systemd/system/irexec.service
Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install.
lirc: 3 installed and not shipped files. [installed-vs-shipped] lirc-0.9.4d: lirc:
/lirc-contrib/usr/share/lirc/contrib/99-remote-control-lirc.rules is owned by uid 3004, which is the same as the user running bitbake. This may be due to host contamination
lirc: /lirc-contrib/usr/share/lirc/contrib/97-lircd-uinput.rules is owned by uid 3004, which is the same as the user running bitbake. This may be due to host contamination
lirc: /lirc-contrib/usr/share/lirc/contrib/61-lirc.blacklist-all.conf is owned by uid 3004, which is the same as the user running bitbake. This may be due to host contamination
lirc: /lirc-contrib/usr/share/lirc/contrib/lircmd.conf is owned by uid 3004, which is the same as the user running bitbake. This may be due to host contamination
lirc: /lirc-contrib/usr/share/lirc/contrib/irexec.desktop is owned by uid 3004, which is the same as the user running bitbake. This may be due to host contamination
lirc: /lirc-contrib/usr/share/lirc/contrib/98-lirc-stable-link.rules is owned by uid 3004, which is the same as the user running bitbake. This may be due to host contamination
lirc: /lirc-contrib/usr/share/lirc/contrib/lircd.conf is owned by uid 3004, which is the same as the user running bitbake. This may be due to host contamination
lirc: /lirc-contrib/usr/share/lirc/contrib/irman2lirc is owned by uid 3004, which is the same as the user running bitbake. This may be due to host contamination
lirc: /lirc-contrib/usr/share/lirc/contrib/60-usb-generic-perms.rules is owned by uid 3004, which is the same as the user running bitbake. This may be due to host contamination
lirc: /lirc-contrib/usr/share/lirc/contrib/release-process.txt is owned by uid 3004, which is the same as the user running bitbake. This may be due to host contamination
lirc: /lirc-contrib/usr/share/lirc/contrib/60-lirc.rules is owned by uid 3004, which is the same as the user running bitbake. This may be due to host contamination
lirc: /lirc-contrib/usr/share/lirc/contrib/lircrc/volume_pulse.lircrc is owned by uid 3004, which is the same as the user running bitbake. This may be due to host contamination
lirc: /lirc-contrib/usr/share/lirc/contrib/lircrc/mplayer.lircrc is owned by uid 3004, which is the same as the user running bitbake. This may be due to host contamination
lirc: /lirc-contrib/usr/share/lirc/contrib/lircrc/volume_mythtv.lircrc is owned by uid 3004, which is the same as the user running bitbake. This may be due to host contamination
lirc: /lirc-contrib/usr/share/lirc/contrib/lircrc/vlc.lircrc is owned by uid 3004, which is the same as the user running bitbake. This may be due to host contamination
lirc: /lirc-contrib/usr/share/lirc/contrib/lircrc/mythtv.lircrc is owned by uid 3004, which is the same as the user running bitbake. This may be due to host contamination
lirc: /lirc-contrib/usr/share/lirc/contrib/lircrc/lircmap.xml is owned by uid 3004, which is the same as the user running bitbake. This may be due to host contamination
lirc: /lirc-contrib/usr/share/lirc/contrib/lircrc/lircrc is owned by uid 3004, which is the same as the user running bitbake. This may be due to host contamination
lirc: /lirc-contrib/usr/share/lirc/contrib/lircrc/volume_alsa.lircrc is owned by uid 3004, which is the same as the user running bitbake. This may be due to host contamination [host-user-contaminated]
Quoted 248 lines · Khem Raj
Signed-off-by Khem Raj <[email protected]>--- meta-oe/recipes-connectivity/lirc/lirc.inc | 2 +- ...crcd-Mark-local-inline-funtions-as-static.patch | 49 ---------- .../recipes-connectivity/lirc/lirc/pollfd.patch | 101 +++++++++++++++++++++ .../lirc/{lirc_0.9.2.bb => lirc_0.9.4d.bb} | 7 +- 4 files changed, 106 insertions(+), 53 deletions(-) delete mode 100644 meta-oe/recipes-connectivity/ lirc/lirc/0001-lircrcd-Mark-local-inline-funtions-as-static.patch create mode 100644 meta-oe/recipes-connectivity/lirc/lirc/pollfd.patch rename meta-oe/recipes-connectivity/lirc/{lirc_0.9.2.bb => lirc_0.9.4d.bb}(92%)
meta-oe/recipes- renamed from meta-oe/recipes-connectivity/lirc/lirc.inc +0
-0connectivity/lirc/lirc.inc
index6ff8e0160..ef79885a0100644meta-oe/recipes-connectivity/lirc/lirc.inc +0
-0@@ -6,7 +6,7 @@ DESCRIPTION_append_lirc-nslu2example = " This packagecontains a working config
HOMEPAGE = "http://www.lirc.org"
SECTION = "console/network"
LICENSE = "GPLv2"meta-oe/recipes-connectivity/lirc/lirc.inc +1
-1-DEPENDS = "alsa-lib libftdi libusb1 libusb-compat jack portaudio-v19" +DEPENDS = "libxslt-native alsa-lib libftdi libusb1 libusb-compat jackportaudio-v19"
SRC_URI= "http://prdownloads.sourceforge.net/lirc/lirc-${PV}.tar.bz2"(quoted diff) +0
-0lircrcd-Mark-local-inline-funtions-as-static.patch b/meta-oe/recipes- connectivity/lirc/lirc/0001-lircrcd-Mark-local-inline- funtions-as-static.patch
deleted file mode 100644
index e19d27671..000000000
--- a/meta-oe/recipes-connectivity/lirc/lirc/0001- lircrcd-Mark-local-inline-funtions-as-static.patch
+++/dev/nullmeta-oe/recipes-connectivity/lirc/lirc.inc +0
-21@@ -1,49 +0,0 @@ -From c2be4543e4777c9e3d74b30326ba37b01917b0a9 Mon Sep 17 00:00:00 2001 -From: Khem Raj <[email protected]> -Date: Thu, 25 Aug 2016 03:02:37 +0000 -Subject: [PATCH] lircrcd: Mark local inline funtions as static - -These functions are not used anywhere outside -this file, so they should be converted into static - -Signed-off-by: Khem Raj <[email protected]> ---- -Upstream-Status: Pending - - daemons/lircrcd.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/daemons/lircrcd.c b/daemons/lircrcd.c -index 55777cd..5ddc94d 100644 ---- a/daemons/lircrcd.c -+++ b/daemons/lircrcd.c -@@ -153,7 +153,7 @@ char *s; - /* A safer write(), since sockets might not write all but only some ofthe
meta-oe/recipes-connectivity/lirc/lirc.inc +0
-28- bytes requested */ - --inline int write_socket(int fd, char *buf, int len) -+static inline int write_socket(int fd, char *buf, int len) - { - int done, todo = len; - -@@ -167,7 +167,7 @@ inline int write_socket(int fd, char *buf, int len) - return (len); - } - --inline int write_socket_len(int fd, char *buf) -+static inline int write_socket_len(int fd, char *buf) - { - int len; - -@@ -177,7 +177,7 @@ inline int write_socket_len(int fd, char *buf) - return (1); - } - --inline int read_timeout(int fd, char *buf, int len, int timeout) -+static inline int read_timeout(int fd, char *buf, int len, int timeout) - { - fd_set fds; - struct timeval tv; --- -1.9.1 -meta-oe/recipes-connectivity/lirc/lirc/pollfd.patch new file +57
-0@@ -0,0 +1,101 @@ +Index: lirc-0.9.4d/daemons/lircrcd.cpp +=================================================================== +--- lirc-0.9.4d.orig/daemons/lircrcd.cpp ++++ lirc-0.9.4d/daemons/lircrcd.cpp +@@ -29,10 +29,12 @@ + #include <sys/un.h> + #include <sys/stat.h> + #include <sys/types.h> ++#include <poll.h> + #include <syslog.h> + + #include "lirc_client.h" + #include "lirc/lirc_log.h" ++#include "lirc/curl_poll.h" + + #define MAX_CLIENTS 100 + #define WHITE_SPACE " \t" +Index: lirc-0.9.4d/lib/curl_poll.c +=================================================================== +--- lirc-0.9.4d.orig/lib/curl_poll.c ++++ lirc-0.9.4d/lib/curl_poll.c +@@ -36,6 +36,7 @@ + #include <stdlib.h> + #include <sys/time.h> + #include <sys/types.h> ++#include <sys/poll.h> + + #include "lirc_log.h" + #include "curl_poll.h" +@@ -67,7 +68,7 @@ static const logchannel_t logchannel = L + + #ifdef HAVE_POLL_FINE + +-int curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms) ++int curl_poll(struct pollfd *ufds, unsigned int nfds, int timeout_ms) + { + return poll(ufds, nfds, timeout_ms); + } +@@ -112,7 +113,7 @@ static int verify_sock(int s) + } + + +-int curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms) ++int curl_poll(struct pollfd *ufds, unsigned int nfds, int timeout_ms) + { + struct timeval pending_tv; + struct timeval* ptimeout; +Index: lirc-0.9.4d/lib/curl_poll.h +=================================================================== +--- lirc-0.9.4d.orig/lib/curl_poll.h ++++ lirc-0.9.4d/lib/curl_poll.h +@@ -1,5 +1,5 @@ +-#ifndef _POLL_H +-#define _POLL_H ++#ifndef _LIB_CURL_POLL_H ++#define _LIB_CURL_POLL_H + /***************************************************************************
meta-oe/recipes-connectivity/lirc/lirc/pollfd.patch new file +27
-0+ * _ _ ____ _ + * Project ___| | | | _ \| | +@@ -29,13 +29,9 @@ + extern "C" { + #endif + +-#ifdef HAVE_SYS_POLL_H +-#include <sys/poll.h> +-#else + #include <poll.h> +-#endif + +-int curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms); ++int curl_poll(struct pollfd *ufds, unsigned int nfds, int timeout_ms); + + #ifdef __cplusplus + } +Index: lirc-0.9.4d/lib/lirc/curl_poll.h +=================================================================== +--- lirc-0.9.4d.orig/lib/lirc/curl_poll.h ++++ lirc-0.9.4d/lib/lirc/curl_poll.h +@@ -1,5 +1,5 @@ +-#ifndef _POLL_H +-#define _POLL_H ++#ifndef _LIRC_CURL_POLL_H ++#define _LIRC_CURL_POLL_H + /***************************************************************************
meta-oe/recipes-connectivity/lirc/lirc/pollfd.patch new file +17
-0+ * _ _ ____ _ + * Project ___| | | | _ \| | +@@ -29,13 +29,9 @@ + extern "C" { + #endif + +-#ifdef HAVE_SYS_POLL_H +-#include <sys/poll.h> +-#else + #include <poll.h> +-#endif + +-int curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms); ++int curl_poll(struct pollfd *ufds, unsigned int nfds, int timeout_ms); + + #ifdef __cplusplus + }meta-oe/recipes-connectivity/lirc/lirc_0.9.4d.bb renamed from meta-oe/recipes-connectivity/lirc/lirc_0.9.2.bb +1
-3@@ -1,7 +1,7 @@ require lirc.inc SRC_URI += " \ - file://0001-lircrcd-Mark-local-inline-funtions-as-static.patch \ + file://pollfd.patch \ file://lircd.service \ file://lircd.init \ file://lircexec.init \@@ -11,8 +11,8 @@ SRC_URI += " \ " #file://0001-Adaptation-for-STM-configuration.patch \ # -SRC_URI[md5sum] = "3afc84e79c0839823cc20e7a710dd06d" -SRC_URI[sha256sum] = "4e3f948fcdee6dce009171143f0cb7
cd7be48593dd58138db4101a41f651a1dd"meta-oe/recipes-connectivity/lirc/lirc_0.9.4d.bb renamed from meta-oe/recipes-connectivity/lirc/lirc_0.9.2.bb +2
-0+SRC_URI[md5sum] = "0d11679cbdd94a5a6da00a8e7231b4bf" +SRC_URI[sha256sum] = "c68f18c35b489b865c0a741d119b13
6e8702191538cd3551b977a7af6c4e41ab"
SYSTEMD_PACKAGES= "lirc" SYSTEMD_SERVICE_${PN} = "lircd.service lircmd.service"meta-oe/recipes-connectivity/lirc/lirc_0.9.4d.bb renamed from meta-oe/recipes-connectivity/lirc/lirc_0.9.2.bb +1
-0@@ -27,6 +27,7 @@ PACKAGECONFIG ?= " \ ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', ' systemd', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', ' x11', '', d)} \ " +CACHED_CONFIGUREVARS = "HAVE_WORKING_POLL=yes" #EXTRA_OEMAKE = 'SUBDIRS="lib daemons tools"'
do_install_append(){
--
2.12.2--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel