[openwrt/openwrt] ipset: include libgen.h for basename

LEDE Commits lede-commits at lists.infradead.org
Tue Apr 16 21:16:52 PDT 2024


981213 pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/c7fb5d4cac7534e63d91bdf5e5ee5b4e5213e488

commit c7fb5d4cac7534e63d91bdf5e5ee5b4e5213e488
Author: Chuanhong Guo <gch981213 at gmail.com>
AuthorDate: Wed Apr 17 12:12:25 2024 +0800

    ipset: include libgen.h for basename
    
    musl dropped the GNU version of basename prototype from string.h
    in 1.2.5.
    
    Signed-off-by: Chuanhong Guo <gch981213 at gmail.com>
---
 .../ipset/patches/0001-include-libgen.h-for-basename.patch   | 12 ++++++++++++
 1 file changed, 12 insertions(+)

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
index 0000000000..fb86bbab15
--- /dev/null
+++ b/package/network/utils/ipset/patches/0001-include-libgen.h-for-basename.patch
@@ -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 */




More information about the lede-commits mailing list