diff --git a/backport-Fix-signed-vs-unsigned-comparison.patch b/backport-Fix-signed-vs-unsigned-comparison.patch new file mode 100644 index 0000000000000000000000000000000000000000..f913a78b8628c412aab0d31bfa1b9d9193a73ee9 --- /dev/null +++ b/backport-Fix-signed-vs-unsigned-comparison.patch @@ -0,0 +1,29 @@ +From 1cd845bffbe55a63ee985e7bf161a52d763f9c36 Mon Sep 17 00:00:00 2001 +From: serge-sans-paille +Date: Sat, 22 Apr 2023 02:16:04 +0800 +Subject: [PATCH] Fix signed vs unsigned comparison (#765) + +As reported by -Wsign-compare. In the case of getting the result of +comparing the result of sysconf (_SC_PAGESIZE) to other value, this also +correctly handles edge cases where the above fails and returns -1. + +Signed-off-by: Wang Zhang +--- + src/closures.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/closures.c b/src/closures.c +index 5120021..c02e818 100644 +--- a/src/closures.c ++++ b/src/closures.c +@@ -734,7 +734,7 @@ open_temp_exec_file (void) + static int + allocate_space (int fd, off_t offset, off_t len) + { +- static size_t page_size; ++ static long page_size; + + /* Obtain system page size. */ + if (!page_size) +-- +2.34.1 \ No newline at end of file diff --git a/libffi.spec b/libffi.spec index 9e65a74a6559defd9e8a9fb0d05999a175c8acd5..b69e9fb5d9d3ddd923a707e5fb09b508ec3c7906 100644 --- a/libffi.spec +++ b/libffi.spec @@ -1,12 +1,13 @@ Name: libffi Version: 3.3 -Release: 8 +Release: 9 Summary: A Portable Foreign Function Interface Library License: MIT URL: http://sourceware.org/libff Source0: ftp://sourceware.org/pub/libffi/%{name}-%{version}.tar.gz Patch0: Add-gcc-bug-tests-back.patch +Patch1: backport-Fix-signed-vs-unsigned-comparison.patch BuildRequires: gcc gcc-c++ dejagnu @@ -88,6 +89,12 @@ fi %{_infodir}/libffi.info.gz %changelog +* Wed Apr 26 2023 zhangwang - 3.3-9 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:backport patches from upstream + * Mon Dec 6 2021 panxiaohe - 3.3-8 - Type:enhancement - ID:NA