Skip to contentSkip to conversation

ipset: Fix implicit declaration of function basename

PATCH In review [email protected] 3 participants 3 messages Aug 30, 2024 – Sep 2, 2024 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ipset: Fix implicit declaration of function basename

From: Mike Pagano <[email protected]>

basename(3) is defined in libgen.h in MUSL.
Include libgen.h where basename(3) is used.

---
 src/ipset.c | 1 +
 1 file changed, 1 insertion(+)
src/ipset.c +1 -0
index 162f477..d7733bf 100644
@@ -15,6 +15,7 @@
 #include <config.h>
 #include <libipset/ipset.h>		/* ipset library */
 #include <libipset/xlate.h>		/* translate to nftables */
+#include <libgen.h>
 
 int
 main(int argc, char *argv[])
Signature · 1 line
2.46.0
#2 lore raw
In reply to [email protected]

Hi Mike,

Quoted 4 lines · On Fri, 30 Aug 2024, [email protected] wrote:

From: Mike Pagano <[email protected]>

basename(3) is defined in libgen.h in MUSL.
Include libgen.h where basename(3) is used.

Patch is applied in the ipset git tree, thank you.

Best regards,
Jozsef

Quoted 22 lines

---
src/ipset.c | 1 +

1 file changed, 1 insertion(+)
src/ipset.c +1 -0
index 162f477..d7733bf 100644
@@ -15,6 +15,7 @@
 #include <config.h>
 #include <libipset/ipset.h>		/* ipset library */
 #include <libipset/xlate.h>		/* translate to nftables */
+#include <libgen.h>
 

int
main(int argc, char *argv[])

Signature · 1 line
2.46.0