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 0000000000000000000000000000000000000000..e330046a8f971fa6baf315b7347fab50eac232a1 --- /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 f509f2f5d95d90dda0775667f54fbeeaf8c32670..3913e0504e690e91a51b22727b46fb94c57f87ef 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,12 @@ Patch1006: gpgme-1.13.1-fix-null-deref.patch # packaged) Patch1007: gpgme-1.13.1-pkgconfig.patch +%ifarch sw_64 +# Since 2.34, glibc introduces closefrom (the implementation +# follows *BSD standard). +Patch1008: gpgme-1.3.2-core-Support-closefrom-also-for-glibc.patch +%endif # sw_64 + #BuildRequires: autoconf #BuildRequires: automake BuildRequires: gcc @@ -275,6 +281,10 @@ fi %doc AUTHORS ChangeLog NEWS README* THANKS TODO VERSION %changelog +* Thu Sep 14 2023 Weisson - 1.13.1-11.0.2 +- core: Support closefrom also for glibc. +- Since 2.34, glibc introduces closefrom (the implementation follows *BSD standard). + * Mon Jul 18 2022 Bo Ren - 1.13.1-11.0.1 - Add doc sub package