From: Ankur Tyagi <[email protected]>

Also include tag in the SRC_URI and refreshed patches.

Backported patch 0004-linux-use-sys-stat.h-instead-of-linux-stat.h.patch
to resolve build failure with musl.

Release Notes:
https://github.com/openzfs/zfs/releases/tag/zfs-2.2.9

Signed-off-by: Ankur Tyagi <[email protected]>
---
 ...Define-strndupa-if-it-does-not-exist.patch |  5 +-
 ...arch64-inline-assembly-for-gcc-13.1.patch} |  6 +-
 ...admmap-Replace-uint_t-with-uint32_t.patch} | 11 +--
 ...e-sys-stat.h-instead-of-linux-stat.h.patch | 83 +++++++++++++++++++
 .../zfs/{zfs_2.2.8.bb => zfs_2.2.9.bb}        |  9 +-
 5 files changed, 98 insertions(+), 16 deletions(-)
 rename 
meta-filesystems/recipes-filesystems/zfs/zfs/{aaf28a4630af60496c9d33db1d06a7d7d8983422.patch
 => 0002-fixes-broken-aarch64-inline-assembly-for-gcc-13.1.patch} (94%)
 rename 
meta-filesystems/recipes-filesystems/zfs/zfs/{0001-fs-tests-cmd-readmmap-Replace-uint_t-with-uint32_t.patch
 => 0003-fs-tests-cmd-readmmap-Replace-uint_t-with-uint32_t.patch} (83%)
 create mode 100644 
meta-filesystems/recipes-filesystems/zfs/zfs/0004-linux-use-sys-stat.h-instead-of-linux-stat.h.patch
 rename meta-filesystems/recipes-filesystems/zfs/{zfs_2.2.8.bb => zfs_2.2.9.bb} 
(91%)

diff --git 
a/meta-filesystems/recipes-filesystems/zfs/zfs/0001-Define-strndupa-if-it-does-not-exist.patch
 
b/meta-filesystems/recipes-filesystems/zfs/zfs/0001-Define-strndupa-if-it-does-not-exist.patch
index 80955b3ca0..c607936e28 100644
--- 
a/meta-filesystems/recipes-filesystems/zfs/zfs/0001-Define-strndupa-if-it-does-not-exist.patch
+++ 
b/meta-filesystems/recipes-filesystems/zfs/zfs/0001-Define-strndupa-if-it-does-not-exist.patch
@@ -1,4 +1,4 @@
-From cc0cd6f71f6ef96fca2d7b730a3f0f6722fec696 Mon Sep 17 00:00:00 2001
+From 339359b9af5f24dedebe7234edd586e3fcacd436 Mon Sep 17 00:00:00 2001
 From: Khem Raj <[email protected]>
 Date: Sat, 7 May 2022 12:15:22 -0700
 Subject: [PATCH] Define strndupa if it does not exist
@@ -7,13 +7,12 @@ musl e.g. does not supply strndupa, unlike glibc
 
 Upstream-Status: Pending
 Signed-off-by: Khem Raj <[email protected]>
-
 ---
  etc/systemd/system-generators/zfs-mount-generator.c | 9 +++++++++
  1 file changed, 9 insertions(+)
 
 diff --git a/etc/systemd/system-generators/zfs-mount-generator.c 
b/etc/systemd/system-generators/zfs-mount-generator.c
-index f4c6c26..255bee4 100644
+index ab5dc4d78..d70cd2617 100644
 --- a/etc/systemd/system-generators/zfs-mount-generator.c
 +++ b/etc/systemd/system-generators/zfs-mount-generator.c
 @@ -193,6 +193,15 @@ fopenat(int dirfd, const char *pathname, int flags,
diff --git 
a/meta-filesystems/recipes-filesystems/zfs/zfs/aaf28a4630af60496c9d33db1d06a7d7d8983422.patch
 
b/meta-filesystems/recipes-filesystems/zfs/zfs/0002-fixes-broken-aarch64-inline-assembly-for-gcc-13.1.patch
similarity index 94%
rename from 
meta-filesystems/recipes-filesystems/zfs/zfs/aaf28a4630af60496c9d33db1d06a7d7d8983422.patch
rename to 
meta-filesystems/recipes-filesystems/zfs/zfs/0002-fixes-broken-aarch64-inline-assembly-for-gcc-13.1.patch
index f5504b389d..63dc71555a 100644
--- 
a/meta-filesystems/recipes-filesystems/zfs/zfs/aaf28a4630af60496c9d33db1d06a7d7d8983422.patch
+++ 
b/meta-filesystems/recipes-filesystems/zfs/zfs/0002-fixes-broken-aarch64-inline-assembly-for-gcc-13.1.patch
@@ -1,4 +1,4 @@
-From aaf28a4630af60496c9d33db1d06a7d7d8983422 Mon Sep 17 00:00:00 2001
+From d05d2583ae1807e380492ea8570106c1f0a9effb Mon Sep 17 00:00:00 2001
 From: Sebastian Gottschall <[email protected]>
 Date: Tue, 23 May 2023 13:50:24 +0600
 Subject: [PATCH] fixes broken aarch64 inline assembly for gcc 13.1
@@ -39,9 +39,11 @@ Signed-off-by: Khem Raj <[email protected]>
  module/Kbuild.in | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
 
+diff --git a/module/Kbuild.in b/module/Kbuild.in
+index a72d2a4cc..c6134baec 100644
 --- a/module/Kbuild.in
 +++ b/module/Kbuild.in
-@@ -57,9 +57,9 @@ asflags-y := $(ZFS_MODULE_CFLAGS) $(ZFS_
+@@ -57,9 +57,9 @@ asflags-y := $(ZFS_MODULE_CFLAGS) $(ZFS_MODULE_CPPFLAGS)
  ccflags-y := $(ZFS_MODULE_CFLAGS) $(ZFS_MODULE_CPPFLAGS)
  
  ifeq ($(CONFIG_ARM64),y)
diff --git 
a/meta-filesystems/recipes-filesystems/zfs/zfs/0001-fs-tests-cmd-readmmap-Replace-uint_t-with-uint32_t.patch
 
b/meta-filesystems/recipes-filesystems/zfs/zfs/0003-fs-tests-cmd-readmmap-Replace-uint_t-with-uint32_t.patch
similarity index 83%
rename from 
meta-filesystems/recipes-filesystems/zfs/zfs/0001-fs-tests-cmd-readmmap-Replace-uint_t-with-uint32_t.patch
rename to 
meta-filesystems/recipes-filesystems/zfs/zfs/0003-fs-tests-cmd-readmmap-Replace-uint_t-with-uint32_t.patch
index f1cfab4daf..d106bc0cdd 100644
--- 
a/meta-filesystems/recipes-filesystems/zfs/zfs/0001-fs-tests-cmd-readmmap-Replace-uint_t-with-uint32_t.patch
+++ 
b/meta-filesystems/recipes-filesystems/zfs/zfs/0003-fs-tests-cmd-readmmap-Replace-uint_t-with-uint32_t.patch
@@ -1,4 +1,4 @@
-From 1f9a5cb860b3509791e59a8cae9d5f265e832ed0 Mon Sep 17 00:00:00 2001
+From b37f4e0f11186206863f41e1a638ca4e57c3dc53 Mon Sep 17 00:00:00 2001
 From: Khem Raj <[email protected]>
 Date: Sun, 28 May 2023 16:33:15 -0700
 Subject: [PATCH] fs-tests/cmd/readmmap: Replace uint_t with uint32_t
@@ -12,7 +12,7 @@ Signed-off-by: Khem Raj <[email protected]>
  1 file changed, 3 insertions(+), 2 deletions(-)
 
 diff --git a/tests/zfs-tests/cmd/readmmap.c b/tests/zfs-tests/cmd/readmmap.c
-index 704ffd55c8..a2590e0e8d 100644
+index a5c8079d0..c22b58e9d 100644
 --- a/tests/zfs-tests/cmd/readmmap.c
 +++ b/tests/zfs-tests/cmd/readmmap.c
 @@ -38,6 +38,7 @@
@@ -23,7 +23,7 @@ index 704ffd55c8..a2590e0e8d 100644
  #include <stdio.h>
  #include <stdlib.h>
  #include <unistd.h>
-@@ -55,7 +56,7 @@ main(int argc, char **argv)
+@@ -56,7 +57,7 @@ main(int argc, char **argv)
        char *buf = NULL;
        char *map = NULL;
        int fd = -1, bytes, retval = 0;
@@ -32,7 +32,7 @@ index 704ffd55c8..a2590e0e8d 100644
  
        if (argc < 2 || optind == argc) {
                (void) fprintf(stderr,
-@@ -92,7 +93,7 @@ main(int argc, char **argv)
+@@ -93,7 +94,7 @@ main(int argc, char **argv)
                retval = 1;
                goto end;
        }
@@ -41,6 +41,3 @@ index 704ffd55c8..a2590e0e8d 100644
        srandom(seed);
  
        idx = random() % size;
--- 
-2.40.1
-
diff --git 
a/meta-filesystems/recipes-filesystems/zfs/zfs/0004-linux-use-sys-stat.h-instead-of-linux-stat.h.patch
 
b/meta-filesystems/recipes-filesystems/zfs/zfs/0004-linux-use-sys-stat.h-instead-of-linux-stat.h.patch
new file mode 100644
index 0000000000..53fa5d9b5c
--- /dev/null
+++ 
b/meta-filesystems/recipes-filesystems/zfs/zfs/0004-linux-use-sys-stat.h-instead-of-linux-stat.h.patch
@@ -0,0 +1,83 @@
+From a4d9aadf0094392e5e477dbc8c43f973692dab00 Mon Sep 17 00:00:00 2001
+From: classabbyamp <[email protected]>
+Date: Wed, 27 Aug 2025 17:42:32 -0400
+Subject: [PATCH] linux: use sys/stat.h instead of linux/stat.h
+
+glibc includes linux/stat.h for statx, but musl defines its own statx
+struct and associated constants, which does not include STATX_MNT_ID
+yet. Thus, including linux/stat.h directly should be avoided for
+maximum libc compatibility.
+
+Tested on:
+  - glibc: x86_64, i686, aarch64, armv7l, armv6l
+  - musl: x86_64, aarch64, armv7l, armv6l
+
+Reviewed-by: Brian Behlendorf <[email protected]>
+Tested-By: Achill Gilgenast <[email protected]>
+Signed-off-by: classabbyamp <[email protected]>
+Closes #17675
+(cherry picked from commit ccf5a8a6fcfdfbdaa2f0fdca5d787958224bf06d)
+
+Upstream-Status: Backport 
[https://github.com/openzfs/zfs/commit/ccf5a8a6fcfdfbdaa2f0fdca5d787958224bf06d]
+Signed-off-by: Ankur Tyagi <[email protected]>
+---
+ config/user-statx.m4                   | 6 +++---
+ include/os/linux/spl/sys/stat.h        | 2 +-
+ lib/libspl/include/os/linux/sys/stat.h | 2 +-
+ 3 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/config/user-statx.m4 b/config/user-statx.m4
+index 0315f93e0..1ba74a40e 100644
+--- a/config/user-statx.m4
++++ b/config/user-statx.m4
+@@ -2,7 +2,7 @@ dnl #
+ dnl # Check for statx() function and STATX_MNT_ID availability
+ dnl #
+ AC_DEFUN([ZFS_AC_CONFIG_USER_STATX], [
+-      AC_CHECK_HEADERS([linux/stat.h],
++      AC_CHECK_HEADERS([sys/stat.h],
+               [have_stat_headers=yes],
+               [have_stat_headers=no])
+ 
+@@ -14,7 +14,7 @@ AC_DEFUN([ZFS_AC_CONFIG_USER_STATX], [
+                       AC_MSG_CHECKING([for STATX_MNT_ID])
+                       AC_COMPILE_IFELSE([
+                               AC_LANG_PROGRAM([[
+-                                      #include <linux/stat.h>
++                                      #include <sys/stat.h>
+                               ]], [[
+                                       struct statx stx;
+                                       int mask = STATX_MNT_ID;
+@@ -29,6 +29,6 @@ AC_DEFUN([ZFS_AC_CONFIG_USER_STATX], [
+                       ])
+               ])
+       ], [
+-              AC_MSG_WARN([linux/stat.h not found; skipping statx support])
++              AC_MSG_WARN([sys/stat.h not found; skipping statx support])
+       ])
+ ])  dnl end AC_DEFUN
+diff --git a/include/os/linux/spl/sys/stat.h b/include/os/linux/spl/sys/stat.h
+index 598784964..5c8cff72e 100644
+--- a/include/os/linux/spl/sys/stat.h
++++ b/include/os/linux/spl/sys/stat.h
+@@ -24,6 +24,6 @@
+ #ifndef _SPL_STAT_H
+ #define       _SPL_STAT_H
+ 
+-#include <linux/stat.h>
++#include <sys/stat.h>
+ 
+ #endif /* SPL_STAT_H */
+diff --git a/lib/libspl/include/os/linux/sys/stat.h 
b/lib/libspl/include/os/linux/sys/stat.h
+index 5fbe892ee..ef8738fa8 100644
+--- a/lib/libspl/include/os/linux/sys/stat.h
++++ b/lib/libspl/include/os/linux/sys/stat.h
+@@ -32,7 +32,7 @@
+ 
+ #ifdef HAVE_STATX
+ #include <fcntl.h>
+-#include <linux/stat.h>
++#include <sys/stat.h>
+ #endif
+ 
+ /*
diff --git a/meta-filesystems/recipes-filesystems/zfs/zfs_2.2.8.bb 
b/meta-filesystems/recipes-filesystems/zfs/zfs_2.2.9.bb
similarity index 91%
rename from meta-filesystems/recipes-filesystems/zfs/zfs_2.2.8.bb
rename to meta-filesystems/recipes-filesystems/zfs/zfs_2.2.9.bb
index 1fc1457b19..22d35516e7 100644
--- a/meta-filesystems/recipes-filesystems/zfs/zfs_2.2.8.bb
+++ b/meta-filesystems/recipes-filesystems/zfs/zfs_2.2.9.bb
@@ -4,11 +4,12 @@ LICENSE = "CDDL-1.0"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=7087caaf1dc8a2856585619f4a787faa"
 HOMEPAGE = "https://github.com/openzfs/zfs";
 
-SRCREV = "3e4a3e161c00273303cd9fa9e0dc09ead3499a8a"
-SRC_URI = "git://github.com/openzfs/zfs;protocol=https;branch=zfs-2.2-release \
+SRCREV = "079ba86d71571bf997ff688da061d8c4aa2fd052"
+SRC_URI = 
"git://github.com/openzfs/zfs;protocol=https;branch=zfs-2.2-release;tag=${BP} \
            file://0001-Define-strndupa-if-it-does-not-exist.patch \
-           file://aaf28a4630af60496c9d33db1d06a7d7d8983422.patch \
-           
file://0001-fs-tests-cmd-readmmap-Replace-uint_t-with-uint32_t.patch \
+           file://0002-fixes-broken-aarch64-inline-assembly-for-gcc-13.1.patch 
\
+           
file://0003-fs-tests-cmd-readmmap-Replace-uint_t-with-uint32_t.patch \
+           file://0004-linux-use-sys-stat.h-instead-of-linux-stat.h.patch \
 "
 
 
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#125011): 
https://lists.openembedded.org/g/openembedded-devel/message/125011
Mute This Topic: https://lists.openembedded.org/mt/118231141/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to