aboutsummaryrefslogtreecommitdiffstats
path: root/meta-filesystems/recipes-filesystems
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2023-05-28 16:34:31 -0700
committerKhem Raj <raj.khem@gmail.com>2023-05-28 16:35:00 -0700
commit1c0e1d92b27a3d9c042b458631e7d0ebd024858e (patch)
treedd3848da307eee09dbe561483c33b2dc3f5d0181 /meta-filesystems/recipes-filesystems
parent20cea78248b9d8fc47de731d25b4ea26ffa9103b (diff)
downloadmeta-openembedded-contrib-1c0e1d92b27a3d9c042b458631e7d0ebd024858e.tar.gz
zfs: Fix build on musl
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-filesystems/recipes-filesystems')
-rw-r--r--meta-filesystems/recipes-filesystems/zfs/zfs/0001-fs-tests-cmd-readmmap-Replace-uint_t-with-uint32_t.patch46
-rw-r--r--meta-filesystems/recipes-filesystems/zfs/zfs_2.1.11.bb1
2 files changed, 47 insertions, 0 deletions
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/0001-fs-tests-cmd-readmmap-Replace-uint_t-with-uint32_t.patch
new file mode 100644
index 0000000000..f1cfab4daf
--- /dev/null
+++ b/meta-filesystems/recipes-filesystems/zfs/zfs/0001-fs-tests-cmd-readmmap-Replace-uint_t-with-uint32_t.patch
@@ -0,0 +1,46 @@
+From 1f9a5cb860b3509791e59a8cae9d5f265e832ed0 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 28 May 2023 16:33:15 -0700
+Subject: [PATCH] fs-tests/cmd/readmmap: Replace uint_t with uint32_t
+
+Makes it portable across glibc and musl
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ tests/zfs-tests/cmd/readmmap.c | 5 +++--
+ 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
+--- a/tests/zfs-tests/cmd/readmmap.c
++++ b/tests/zfs-tests/cmd/readmmap.c
+@@ -38,6 +38,7 @@
+ * 0 : no errors
+ * --------------------------------------------------------------
+ */
++#include <stdint.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <unistd.h>
+@@ -55,7 +56,7 @@ main(int argc, char **argv)
+ char *buf = NULL;
+ char *map = NULL;
+ int fd = -1, bytes, retval = 0;
+- uint_t seed;
++ uint32_t seed;
+
+ if (argc < 2 || optind == argc) {
+ (void) fprintf(stderr,
+@@ -92,7 +93,7 @@ main(int argc, char **argv)
+ retval = 1;
+ goto end;
+ }
+- seed = (uint_t)time(NULL);
++ seed = (uint32_t)time(NULL);
+ srandom(seed);
+
+ idx = random() % size;
+--
+2.40.1
+
diff --git a/meta-filesystems/recipes-filesystems/zfs/zfs_2.1.11.bb b/meta-filesystems/recipes-filesystems/zfs/zfs_2.1.11.bb
index 942f5f9de1..bd463b8acc 100644
--- a/meta-filesystems/recipes-filesystems/zfs/zfs_2.1.11.bb
+++ b/meta-filesystems/recipes-filesystems/zfs/zfs_2.1.11.bb
@@ -8,6 +8,7 @@ SRCREV = "0f03a411615a797425de488eecfaaf63fc41acfe"
SRC_URI = "git://github.com/openzfs/zfs;protocol=https;branch=master \
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 \
"
S = "${WORKDIR}/git"