diff options
| author | Khem Raj <raj.khem@gmail.com> | 2024-03-24 22:04:03 -0700 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2024-03-24 22:52:26 -0700 |
| commit | ccff89588a5f4fa58a47f6970c6a2b1f20f06a8a (patch) | |
| tree | b658ee0013a9d73681eed5190be54af5e25c62e2 | |
| parent | 742c3da8747b291e9624fc83948d5dc3ba04a33e (diff) | |
| download | meta-openembedded-ccff89588a5f4fa58a47f6970c6a2b1f20f06a8a.tar.gz | |
ipset: Update to 7.21
Fix build with latest musl while here
Signed-off-by: Khem Raj <raj.khem@gmail.com>
| -rw-r--r-- | meta-networking/recipes-filter/ipset/ipset/0001-ipset-Define-portable-basename-function.patch | 50 | ||||
| -rw-r--r-- | meta-networking/recipes-filter/ipset/ipset_7.21.bb (renamed from meta-networking/recipes-filter/ipset/ipset_7.19.bb) | 5 |
2 files changed, 53 insertions, 2 deletions
diff --git a/meta-networking/recipes-filter/ipset/ipset/0001-ipset-Define-portable-basename-function.patch b/meta-networking/recipes-filter/ipset/ipset/0001-ipset-Define-portable-basename-function.patch new file mode 100644 index 0000000000..a06bcac362 --- /dev/null +++ b/meta-networking/recipes-filter/ipset/ipset/0001-ipset-Define-portable-basename-function.patch | |||
| @@ -0,0 +1,50 @@ | |||
| 1 | From 8c5c0a7a48af7652c50bc27a4efdd9cb4f7d95bd Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Sun, 24 Mar 2024 21:58:50 -0700 | ||
| 4 | Subject: [PATCH] ipset: Define portable basename function | ||
| 5 | |||
| 6 | Newer version of musl have removed prototype for basename in string.h [1] | ||
| 7 | which now makes it fail to compile with newer clang 18+ compiler therefore | ||
| 8 | define own basename utility function and not depend on platform for it. | ||
| 9 | |||
| 10 | [1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7 | ||
| 11 | |||
| 12 | Upstream-Status: Pending | ||
| 13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 14 | --- | ||
| 15 | src/ipset.c | 12 +++++++++++- | ||
| 16 | 1 file changed, 11 insertions(+), 1 deletion(-) | ||
| 17 | |||
| 18 | diff --git a/src/ipset.c b/src/ipset.c | ||
| 19 | index 162f477..7b5d580 100644 | ||
| 20 | --- a/src/ipset.c | ||
| 21 | +++ b/src/ipset.c | ||
| 22 | @@ -16,6 +16,16 @@ | ||
| 23 | #include <libipset/ipset.h> /* ipset library */ | ||
| 24 | #include <libipset/xlate.h> /* translate to nftables */ | ||
| 25 | |||
| 26 | +/* basename is implemented differently across different C libraries. This | ||
| 27 | + * implementation matches the one provided by the GNU libc, and does not | ||
| 28 | + * modify its input parameter. | ||
| 29 | + */ | ||
| 30 | +static const char *ipset_basename(const char *path) | ||
| 31 | +{ | ||
| 32 | + const char *base = strrchr(path, '/'); | ||
| 33 | + return base ? base + 1 : path; | ||
| 34 | +} | ||
| 35 | + | ||
| 36 | int | ||
| 37 | main(int argc, char *argv[]) | ||
| 38 | { | ||
| 39 | @@ -32,7 +42,7 @@ main(int argc, char *argv[]) | ||
| 40 | exit(1); | ||
| 41 | } | ||
| 42 | |||
| 43 | - if (!strcmp(basename(argv[0]), "ipset-translate")) { | ||
| 44 | + if (!strcmp(ipset_basename(argv[0]), "ipset-translate")) { | ||
| 45 | ret = ipset_xlate_argv(ipset, argc, argv); | ||
| 46 | } else { | ||
| 47 | ret = ipset_parse_argv(ipset, argc, argv); | ||
| 48 | -- | ||
| 49 | 2.44.0 | ||
| 50 | |||
diff --git a/meta-networking/recipes-filter/ipset/ipset_7.19.bb b/meta-networking/recipes-filter/ipset/ipset_7.21.bb index bb4319f36c..c7ebdc1c66 100644 --- a/meta-networking/recipes-filter/ipset/ipset_7.19.bb +++ b/meta-networking/recipes-filter/ipset/ipset_7.21.bb | |||
| @@ -9,8 +9,9 @@ SECTION = "base" | |||
| 9 | 9 | ||
| 10 | DEPENDS = "libtool libmnl" | 10 | DEPENDS = "libtool libmnl" |
| 11 | 11 | ||
| 12 | SRC_URI = "http://ftp.netfilter.org/pub/ipset/${BP}.tar.bz2" | 12 | SRC_URI = "http://ftp.netfilter.org/pub/ipset/${BP}.tar.bz2 \ |
| 13 | SRC_URI[sha256sum] = "9bc1fba48d65786e3e0b63dc6b669a866823d77840c6990c0c6b23078ec2c4d6" | 13 | file://0001-ipset-Define-portable-basename-function.patch" |
| 14 | SRC_URI[sha256sum] = "e2c6ce4fcf3acb3893ca5d35c86935f80ad76fc5ccae601185842df760e0bc69" | ||
| 14 | 15 | ||
| 15 | inherit autotools pkgconfig module-base | 16 | inherit autotools pkgconfig module-base |
| 16 | 17 | ||
