diff options
author | Sam James <sam@gentoo.org> | 2022-06-24 06:03:51 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-06-24 06:26:08 +0100 |
commit | fa0dfbb6b2c16007e97457e3bda1ca88b85860fe (patch) | |
tree | a3269f00c76319ab11f5d1b3ba596adc77ec1960 /net-fs | |
parent | net-fs/cifs-utils: version bump to 6.15 (diff) | |
download | gentoo-fa0dfbb6b2c16007e97457e3bda1ca88b85860fe.tar.gz gentoo-fa0dfbb6b2c16007e97457e3bda1ca88b85860fe.tar.bz2 gentoo-fa0dfbb6b2c16007e97457e3bda1ca88b85860fe.zip |
net-fs/cifs-utils: fix build on musl
Closes: https://bugs.gentoo.org/842195
Acked-by: David Seifert <soap@gentoo.org>
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-fs')
-rw-r--r-- | net-fs/cifs-utils/cifs-utils-6.15.ebuild | 1 | ||||
-rw-r--r-- | net-fs/cifs-utils/files/cifs-utils-6.15-musl.patch | 80 |
2 files changed, 81 insertions, 0 deletions
diff --git a/net-fs/cifs-utils/cifs-utils-6.15.ebuild b/net-fs/cifs-utils/cifs-utils-6.15.ebuild index 3ae6b5fd6284..c4415d563b2e 100644 --- a/net-fs/cifs-utils/cifs-utils-6.15.ebuild +++ b/net-fs/cifs-utils/cifs-utils-6.15.ebuild @@ -42,6 +42,7 @@ DOCS="doc/linux-cifs-client-guide.odt" PATCHES=( "${FILESDIR}/${PN}-6.12-ln_in_destdir.patch" #766594 + "${FILESDIR}/${PN}-6.15-musl.patch" ) pkg_setup() { diff --git a/net-fs/cifs-utils/files/cifs-utils-6.15-musl.patch b/net-fs/cifs-utils/files/cifs-utils-6.15-musl.patch new file mode 100644 index 000000000000..f17cc68bdaca --- /dev/null +++ b/net-fs/cifs-utils/files/cifs-utils-6.15-musl.patch @@ -0,0 +1,80 @@ +https://marc.info/?l=linux-cifs&m=165604639613381&w=2 + +From c267ecf6a1c2152e640897d30cc0e8f637a8ef76 Mon Sep 17 00:00:00 2001 +From: Sam James <sam@gentoo.org> +Date: Fri, 24 Jun 2022 05:25:23 +0100 +Subject: [PATCH 1/2] getcifsacl, setcifsacl: add missing <linux/limits.h> + include for XATTR_SIZE_MAX + +Needed to build on musl. It only works on glibc because of transitive includes +(which could break in future). + +Example failure: +``` +getcifsacl.c: In function 'getcifsacl': +getcifsacl.c:429:24: error: 'XATTR_SIZE_MAX' undeclared (first use in this function) + 429 | if (bufsize >= XATTR_SIZE_MAX) { + | ^~~~~~~~~~~~~~ +``` + +Bug: https://bugs.gentoo.org/842195 +Signed-off-by: Sam James <sam@gentoo.org> +--- a/getcifsacl.c ++++ b/getcifsacl.c +@@ -34,6 +34,7 @@ + #include <errno.h> + #include <limits.h> + #include <ctype.h> ++#include <linux/limits.h> + #include <sys/xattr.h> + #include "cifsacl.h" + #include "idmap_plugin.h" +--- a/setcifsacl.c ++++ b/setcifsacl.c +@@ -48,6 +48,7 @@ + #include <errno.h> + #include <limits.h> + #include <ctype.h> ++#include <linux/limits.h> + #include <sys/xattr.h> + + #include "cifsacl.h" +From d1a36cc4caa541d1f0f9a3426a5202b680cf7ff8 Mon Sep 17 00:00:00 2001 +From: Sam James <sam@gentoo.org> +Date: Fri, 24 Jun 2022 05:26:54 +0100 +Subject: [PATCH 2/2] getcifsacl, setcifsacl: add missing <endian.h> include + for le32toh + +Needed to fix build on musl libc. It only works by chance on glibc +because of transitive includes (which could break at any time). + +Example failure: +``` +getcifsacl.c: In function 'print_ace': +getcifsacl.c:284:16: warning: implicit declaration of function 'le16toh' [-Wimplicit-function-declaration] + 284 | size = le16toh(pace->size); + | ^~~~~~~ +``` + +Bug: https://bugs.gentoo.org/842195 +Signed-off-by: Sam James <sam@gentoo.org> +--- a/getcifsacl.c ++++ b/getcifsacl.c +@@ -23,6 +23,7 @@ + #include "config.h" + #endif /* HAVE_CONFIG_H */ + ++#include <endian.h> + #include <string.h> + #include <getopt.h> + #include <stdint.h> +--- a/setcifsacl.c ++++ b/setcifsacl.c +@@ -38,6 +38,7 @@ + #include "config.h" + #endif /* HAVE_CONFIG_H */ + ++#include <endian.h> + #include <string.h> + #include <getopt.h> + #include <stdint.h> |