From d9c803962884de8e505759159f0498b6c9bb1e5b Mon Sep 17 00:00:00 2001 From: Weisson Date: Tue, 5 Nov 2024 19:07:30 +0800 Subject: [PATCH] core: Support closefrom also for glibc. Since 2.34, glibc introduces closefrom (the implementation follows *BSD standard). Signed-off-by: Weisson --- ...ore-Support-closefrom-also-for-glibc.patch | 26 +++++++++++++++++++ gpgme.spec | 10 ++++++- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 gpgme-1.3.2-core-Support-closefrom-also-for-glibc.patch diff --git a/gpgme-1.3.2-core-Support-closefrom-also-for-glibc.patch b/gpgme-1.3.2-core-Support-closefrom-also-for-glibc.patch new file mode 100644 index 0000000..142a5b3 --- /dev/null +++ b/gpgme-1.3.2-core-Support-closefrom-also-for-glibc.patch @@ -0,0 +1,26 @@ +From 525f58b1f187d8e009529381d186a7c8c1ac3ba2 Mon Sep 17 00:00:00 2001 +From: Weisson +Date: Thu, 14 Sep 2023 14:42:11 +0800 +Subject: [PATCH] core: Support closefrom also for glibc. + +Signed-off-by: Weisson +--- + src/posix-io.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/posix-io.c b/src/posix-io.c +index e712ef2..2a3a81f 100644 +--- a/src/posix-io.c ++++ b/src/posix-io.c +@@ -570,7 +570,7 @@ _gpgme_io_spawn (const char *path, char *const argv[], unsigned int flags, + if (fd_list[i].fd > fd) + fd = fd_list[i].fd; + fd++; +-#if defined(__sun) || defined(__FreeBSD__) ++#if defined(__sun) || defined(__FreeBSD__) || defined(__GLIBC__) + closefrom (fd); + max_fds = fd; + #else /*!__sun */ +-- +2.19.1.6.gb485710b + diff --git a/gpgme.spec b/gpgme.spec index 446bd60..2b3540f 100644 --- a/gpgme.spec +++ b/gpgme.spec @@ -1,4 +1,4 @@ -%define anolis_release .0.1 +%define anolis_release .0.2 %bcond_without check %if 0%{?rhel} > 7 @@ -49,6 +49,10 @@ Patch1006: gpgme-1.13.1-fix-null-deref.patch # packaged) Patch1007: gpgme-1.13.1-pkgconfig.patch +# Since 2.34, glibc introduces closefrom (the implementation +# follows *BSD standard). +Patch1008: gpgme-1.3.2-core-Support-closefrom-also-for-glibc.patch + #BuildRequires: autoconf #BuildRequires: automake BuildRequires: gcc @@ -276,6 +280,10 @@ fi %doc AUTHORS ChangeLog NEWS README* THANKS TODO VERSION %changelog +* Sat Nov 9 2024 Weisson - 1.13.1-12.0.2 +- core: Support closefrom also for glibc. +- Since 2.34, glibc introduces closefrom (the implementation follows *BSD standard). + * Mon Jun 24 2024 Bo Ren - 1.13.1-12.0.1 - Add doc sub package -- Gitee