mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2025-10-23 07:23:19 +02:00
zfs: Fix build on musl
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
parent
20cea78248
commit
1c0e1d92b2
|
@ -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
|
||||||
|
|
|
@ -8,6 +8,7 @@ SRCREV = "0f03a411615a797425de488eecfaaf63fc41acfe"
|
||||||
SRC_URI = "git://github.com/openzfs/zfs;protocol=https;branch=master \
|
SRC_URI = "git://github.com/openzfs/zfs;protocol=https;branch=master \
|
||||||
file://0001-Define-strndupa-if-it-does-not-exist.patch \
|
file://0001-Define-strndupa-if-it-does-not-exist.patch \
|
||||||
file://aaf28a4630af60496c9d33db1d06a7d7d8983422.patch \
|
file://aaf28a4630af60496c9d33db1d06a7d7d8983422.patch \
|
||||||
|
file://0001-fs-tests-cmd-readmmap-Replace-uint_t-with-uint32_t.patch \
|
||||||
"
|
"
|
||||||
|
|
||||||
S = "${WORKDIR}/git"
|
S = "${WORKDIR}/git"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user