diff mbox series

ipset: Fix implicit declaration of function basename

Message ID 20240830153119.1136721-1-mpagano@gentoo.org
State Accepted
Delegated to: Jozsef Kadlecsik
Headers show
Series ipset: Fix implicit declaration of function basename | expand

Commit Message

mpagano@gentoo.org Aug. 30, 2024, 3:31 p.m. UTC
From: Mike Pagano <mpagano@gentoo.org>

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

Signed-off-by: Mike Pagano <mpagano@gentoo.org>
---
 src/ipset.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Phil Sutter Aug. 31, 2024, 9:19 a.m. UTC | #1
On Fri, Aug 30, 2024 at 11:31:19AM -0400, mpagano@gentoo.org wrote:
> From: Mike Pagano <mpagano@gentoo.org>
> 
> basename(3) is defined in libgen.h in MUSL. 
> Include libgen.h where basename(3) is used.

On my glibc-based system, basename(3) suggests to include libgen.h, too.

> Signed-off-by: Mike Pagano <mpagano@gentoo.org>

Acked-by: Phil Sutter <phil@nwl.cc>
Jozsef Kadlecsik Sept. 2, 2024, 6:33 a.m. UTC | #2
Hi Mike,

On Fri, 30 Aug 2024, mpagano@gentoo.org wrote:

> From: Mike Pagano <mpagano@gentoo.org>
>
> 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
> Signed-off-by: Mike Pagano <mpagano@gentoo.org>
> ---
> src/ipset.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/src/ipset.c b/src/ipset.c
> index 162f477..d7733bf 100644
> --- a/src/ipset.c
> +++ b/src/ipset.c
> @@ -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[])
> -- 
> 2.46.0
>
>
>
diff mbox series

Patch

diff --git a/src/ipset.c b/src/ipset.c
index 162f477..d7733bf 100644
--- a/src/ipset.c
+++ b/src/ipset.c
@@ -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[])