ipset: include libgen.h for basename
authorChuanhong Guo <gch981213@gmail.com>
Wed, 17 Apr 2024 04:12:25 +0000 (12:12 +0800)
committerChuanhong Guo <gch981213@gmail.com>
Wed, 17 Apr 2024 04:14:20 +0000 (12:14 +0800)
musl dropped the GNU version of basename prototype from string.h
in 1.2.5.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
package/network/utils/ipset/patches/0001-include-libgen.h-for-basename.patch [new file with mode: 0644]

diff --git a/package/network/utils/ipset/patches/0001-include-libgen.h-for-basename.patch b/package/network/utils/ipset/patches/0001-include-libgen.h-for-basename.patch
new file mode 100644 (file)
index 0000000..fb86bba
--- /dev/null
@@ -0,0 +1,12 @@
+--- a/src/ipset.c
++++ b/src/ipset.c
+@@ -6,8 +6,8 @@
+  * it under the terms of the GNU General Public License version 2 as
+  * published by the Free Software Foundation.
+  */
+-#define _GNU_SOURCE
+ #include <assert.h>                   /* assert */
++#include <libgen.h>                   /* basename */
+ #include <stdio.h>                    /* fprintf */
+ #include <stdlib.h>                   /* exit */
+ #include <string.h>                   /* strcmp */