From 1c0e1d92b27a3d9c042b458631e7d0ebd024858e Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 28 May 2023 16:34:31 -0700 Subject: zfs: Fix build on musl Signed-off-by: Khem Raj --- ...cmd-readmmap-Replace-uint_t-with-uint32_t.patch | 46 ++++++++++++++++++++++ .../recipes-filesystems/zfs/zfs_2.1.11.bb | 1 + 2 files changed, 47 insertions(+) create mode 100644 meta-filesystems/recipes-filesystems/zfs/zfs/0001-fs-tests-cmd-readmmap-Replace-uint_t-with-uint32_t.patch (limited to 'meta-filesystems') 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 +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 +--- + 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 + #include + #include + #include +@@ -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" -- cgit v1.2.3-54-g00ecf