net-fs/cifs-utils: fix build in musl

basename() is defined in <libgen.h> in standard

Closes: https://bugs.gentoo.org/936928
Signed-off-by: Z. Liu <zhixu.liu@gmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/41903
Closes: https://github.com/gentoo/gentoo/pull/41903
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Z. Liu
2025-05-02 23:28:23 +08:00
committed by Sam James
parent 21350eeab9
commit fcde99ccaa
3 changed files with 42 additions and 1 deletions

View File

@@ -1,4 +1,4 @@
# Copyright 1999-2024 Gentoo Authors
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -46,6 +46,7 @@ PATCHES=(
"${FILESDIR}/${PN}-6.12-ln_in_destdir.patch" #766594
"${FILESDIR}/${PN}-6.15-musl.patch"
"${FILESDIR}/${PN}-7.0-no-clobber-fortify-source.patch"
"${FILESDIR}/${PN}-7.0-musl.patch"
)
pkg_setup() {

View File

@@ -44,6 +44,7 @@ DOCS="doc/linux-cifs-client-guide.odt"
PATCHES=(
"${FILESDIR}/${PN}-7.3-no-clobber-fortify-source.patch"
"${FILESDIR}/${PN}-7.0-musl.patch"
)
pkg_setup() {

View File

@@ -0,0 +1,39 @@
https://lore.kernel.org/linux-cifs/CALMA0xaVdk3qwkb-92QqF2+6z+=oxbBWDR1hYEoE2WUc7jVGkw@mail.gmail.com/T/#u
From abd3d9a2d4f8a5dc4d90daddc7cf0c62d954f03a Mon Sep 17 00:00:00 2001
From: "Z. Liu" <zhixu.liu@gmail.com>
Date: Fri, 2 May 2025 23:08:41 +0800
Subject: [PATCH] getcifsacl, setcifsacl: use <libgen.h> for basename
basename() is defined in <libgen.h> only in musl, while glibc defines it
in <string.h> too, which is not standard behavior.
Signed-off-by: Z. Liu <zhixu.liu@gmail.com>
diff --git a/getcifsacl.c b/getcifsacl.c
index 97471e9..6c6356f 100644
--- a/getcifsacl.c
+++ b/getcifsacl.c
@@ -33,6 +33,7 @@
#include <stdlib.h>
#include <stddef.h>
#include <errno.h>
+#include <libgen.h>
#include <limits.h>
#include <ctype.h>
#include <linux/limits.h>
diff --git a/setcifsacl.c b/setcifsacl.c
index b199118..3cb603c 100644
--- a/setcifsacl.c
+++ b/setcifsacl.c
@@ -47,6 +47,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
+#include <libgen.h>
#include <limits.h>
#include <ctype.h>
#include <linux/limits.h>
--
2.45.2