commit: 56c2f0ed242a2d1d2f24f2a2fc0cc62bd2e460b4 Author: Haelwenn (lanodan) Monnier <contact <AT> hacktivis <DOT> me> AuthorDate: Fri May 16 19:41:17 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Sun May 18 10:45:06 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=56c2f0ed
sys-fs/zfs: Cherry-pick musl S_IFMT patch from upstream for 2.3.2 Closes: https://bugs.gentoo.org/956272 Signed-off-by: Haelwenn (lanodan) Monnier <contact <AT> hacktivis.me> Part-of: https://github.com/gentoo/gentoo/pull/42121 Closes: https://github.com/gentoo/gentoo/pull/42121 Signed-off-by: Sam James <sam <AT> gentoo.org> sys-fs/zfs/files/2.3.2-musl_S_IFMT.patch | 40 ++++++++++++++++++++++++++++++++ sys-fs/zfs/zfs-2.3.2.ebuild | 1 + 2 files changed, 41 insertions(+) diff --git a/sys-fs/zfs/files/2.3.2-musl_S_IFMT.patch b/sys-fs/zfs/files/2.3.2-musl_S_IFMT.patch new file mode 100644 index 000000000000..d356b818eda8 --- /dev/null +++ b/sys-fs/zfs/files/2.3.2-musl_S_IFMT.patch @@ -0,0 +1,40 @@ +https://github.com/openzfs/zfs/pull/17294 (merged) + +From 634c172ee89f5303493a75dc7ff55e0a355b503a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jos=C3=A9=20Luis=20Salvador=20Rufo?= + <[email protected]> +Date: Fri, 2 May 2025 23:49:25 +0200 +Subject: [PATCH] tests: fix `S_IFMT` undeclared at `statx.c` +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +`S_IFMT` is declared in `sys/stat.h`, but we cannot include this header +because it redeclares the `statx` function with different argument +types. Therefore, we define `S_IFMT` ourselves, in the same way as the +other definitions. + +Reviewed-by: Rob Norris <[email protected]> +Reviewed-by: George Melikov <[email protected]> +Reviewed-by: Alexander Motin <[email protected]> +Signed-off-by: José Luis Salvador Rufo <[email protected]> +Closes #17293 +Closes #17294 +--- + tests/zfs-tests/cmd/statx.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/tests/zfs-tests/cmd/statx.c b/tests/zfs-tests/cmd/statx.c +index 89939f6efb40..1acc7e58c5ce 100644 +--- a/tests/zfs-tests/cmd/statx.c ++++ b/tests/zfs-tests/cmd/statx.c +@@ -109,6 +109,9 @@ _statx(int fd, const char *path, int flags, unsigned int mask, void *stx) + #ifndef STATX_DIOALIGN + #define STATX_DIOALIGN (1<<13) + #endif ++#ifndef S_IFMT ++#define S_IFMT 0170000 ++#endif + + typedef struct { + int64_t tv_sec; diff --git a/sys-fs/zfs/zfs-2.3.2.ebuild b/sys-fs/zfs/zfs-2.3.2.ebuild index 707e354a1959..197191fa3a94 100644 --- a/sys-fs/zfs/zfs-2.3.2.ebuild +++ b/sys-fs/zfs/zfs-2.3.2.ebuild @@ -111,6 +111,7 @@ RESTRICT="test" PATCHES=( "${FILESDIR}"/2.1.5-dracut-zfs-missing.patch + "${FILESDIR}"/2.3.2-musl_S_IFMT.patch ) pkg_pretend() {
