diff --git a/0003-test_fs.c-Fix-issue-on-32-bit-systems-using-btrfs.patch b/0003-test_fs.c-Fix-issue-on-32-bit-systems-using-btrfs.patch new file mode 100644 index 0000000..c851c32 --- /dev/null +++ b/0003-test_fs.c-Fix-issue-on-32-bit-systems-using-btrfs.patch @@ -0,0 +1,34 @@ +From 3d10efa49dc063831787bc01501ab946f6d91282 Mon Sep 17 00:00:00 2001 +From: Stephen Gallagher +Date: Thu, 16 Nov 2023 10:00:20 -0500 +Subject: [PATCH 3/3] test_fs.c: Fix issue on 32-bit systems using btrfs + +On Fedora's build system, the build environment runs on btrfs. This +revealed a bug in the test on i686 systems, where this comparison was +being performed as a comparison of two signed integers, but the +filesystem type of btrfs happens to use the higher-order bits, resulting +in it appearing as a negative value. + +BTRFS_SUPER_MAGIC 0x9123683e + +Signed-off-by: Stephen Gallagher +--- + test/test-fs.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test/test-fs.c b/test/test-fs.c +index 1acdc5c67082c7ea4f579f25af82cd9bd3fefc71..ab8a9e07ccea95493e479703a07bebca5e29be30 100644 +--- a/test/test-fs.c ++++ b/test/test-fs.c +@@ -343,7 +343,7 @@ static void statfs_cb(uv_fs_t* req) { + defined(__OpenBSD__) || defined(__NetBSD__) + ASSERT_OK(stats->f_type); + #else +- ASSERT_GT(stats->f_type, 0); ++ ASSERT_UINT64_GT(stats->f_type, 0); + #endif + + ASSERT_GT(stats->f_bsize, 0); +-- +2.41.0 + diff --git a/libuv.spec b/libuv.spec index 83b0d84..7558641 100644 --- a/libuv.spec +++ b/libuv.spec @@ -35,6 +35,10 @@ Patch: 0001-unix-ignore-ifaddrs-with-NULL-ifa_addr-4218.patch # https://github.com/libuv/libuv/pull/4220 Patch: 0002-test-check-if-ipv6-link-local-traffic-is-routable.patch +# test: Use unsigned comparison for fs_type +# https://github.com/libuv/libuv/pull/4227 +Patch: 0003-test_fs.c-Fix-issue-on-32-bit-systems-using-btrfs.patch + BuildRequires: cmake BuildRequires: gcc BuildRequires: gnupg2