Skip to content

Commit 452e9b6

Browse files
zdykstraahesford
authored andcommitted
zfs-lts: update to 2.2.9.
1 parent 3b3d4b4 commit 452e9b6

File tree

2 files changed

+78
-2
lines changed

2 files changed

+78
-2
lines changed
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
From 0f90c740b0264512cd1eea611a3c3571fb68d9c7 Mon Sep 17 00:00:00 2001
2+
From: classabbyamp <[email protected]>
3+
Date: Wed, 27 Aug 2025 09:14:55 -0400
4+
Subject: [PATCH] linux: use sys/stat.h instead of linux/stat.h
5+
6+
glibc includes linux/stat.h for statx, but musl defines its own statx
7+
struct and associated constants, which does not include STATX_MNT_ID
8+
yet. Thus, including linux/stat.h directly should be avoided for
9+
maximum libc compatibility.
10+
11+
Tested on:
12+
- glibc: x86_64, i686, aarch64, armv7l, armv6l
13+
- musl: x86_64, aarch64, armv7l, armv6l
14+
15+
Signed-off-by: classabbyamp <[email protected]>
16+
---
17+
config/user-statx.m4 | 6 +++---
18+
include/os/linux/spl/sys/stat.h | 2 +-
19+
lib/libspl/include/os/linux/sys/stat.h | 2 +-
20+
3 files changed, 5 insertions(+), 5 deletions(-)
21+
22+
diff --git a/config/user-statx.m4 b/config/user-statx.m4
23+
index 0315f93e0c20..1ba74a40e9b8 100644
24+
--- a/config/user-statx.m4
25+
+++ b/config/user-statx.m4
26+
@@ -2,7 +2,7 @@ dnl #
27+
dnl # Check for statx() function and STATX_MNT_ID availability
28+
dnl #
29+
AC_DEFUN([ZFS_AC_CONFIG_USER_STATX], [
30+
- AC_CHECK_HEADERS([linux/stat.h],
31+
+ AC_CHECK_HEADERS([sys/stat.h],
32+
[have_stat_headers=yes],
33+
[have_stat_headers=no])
34+
35+
@@ -14,7 +14,7 @@ AC_DEFUN([ZFS_AC_CONFIG_USER_STATX], [
36+
AC_MSG_CHECKING([for STATX_MNT_ID])
37+
AC_COMPILE_IFELSE([
38+
AC_LANG_PROGRAM([[
39+
- #include <linux/stat.h>
40+
+ #include <sys/stat.h>
41+
]], [[
42+
struct statx stx;
43+
int mask = STATX_MNT_ID;
44+
@@ -29,6 +29,6 @@ AC_DEFUN([ZFS_AC_CONFIG_USER_STATX], [
45+
])
46+
])
47+
], [
48+
- AC_MSG_WARN([linux/stat.h not found; skipping statx support])
49+
+ AC_MSG_WARN([sys/stat.h not found; skipping statx support])
50+
])
51+
]) dnl end AC_DEFUN
52+
diff --git a/include/os/linux/spl/sys/stat.h b/include/os/linux/spl/sys/stat.h
53+
index 087389b57b34..ad2815e46394 100644
54+
--- a/include/os/linux/spl/sys/stat.h
55+
+++ b/include/os/linux/spl/sys/stat.h
56+
@@ -25,6 +25,6 @@
57+
#ifndef _SPL_STAT_H
58+
#define _SPL_STAT_H
59+
60+
-#include <linux/stat.h>
61+
+#include <sys/stat.h>
62+
63+
#endif /* SPL_STAT_H */
64+
diff --git a/lib/libspl/include/os/linux/sys/stat.h b/lib/libspl/include/os/linux/sys/stat.h
65+
index a605af962a6d..13cc0b46ac93 100644
66+
--- a/lib/libspl/include/os/linux/sys/stat.h
67+
+++ b/lib/libspl/include/os/linux/sys/stat.h
68+
@@ -33,7 +33,7 @@
69+
70+
#ifdef HAVE_STATX
71+
#include <fcntl.h>
72+
-#include <linux/stat.h>
73+
+#include <sys/stat.h>
74+
#endif
75+
76+
/*

srcpkgs/zfs-lts/template

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Template file for 'zfs-lts'
22
pkgname=zfs-lts
3-
version=2.2.8
3+
version=2.2.9
44
revision=1
55
build_style=gnu-configure
66
configure_args="--with-config=user --with-mounthelperdir=/usr/bin
@@ -16,7 +16,7 @@ maintainer="Toyam Cox <[email protected]>"
1616
license="CDDL-1.0"
1717
homepage="https://openzfs.github.io/openzfs-docs/"
1818
distfiles="https://github.com/openzfs/zfs/releases/download/zfs-${version}/zfs-${version}.tar.gz"
19-
checksum=9c6699e69ccd12d614c352bea97ca2a6234ddf8c805e813ee2d134cf4b4a70d9
19+
checksum=07ba7e14c383bce9fd06e611bc8bec45ad03c39f3c83ccea5aa1f77e80c45809
2020
# dkms must be before initramfs-regenerate to build modules before images
2121
triggers="dkms initramfs-regenerate"
2222
dkms_modules="zfs ${version}"

0 commit comments

Comments
 (0)