!10 【Mainline】Fix the compilation failure with new version glibc
From: @yixiangzhike Reviewed-by: @zhujianwei001 Signed-off-by: @zhujianwei001
This commit is contained in:
commit
0c3f397312
32
backport-core-Support-closefrom-also-for-glibc.patch
Normal file
32
backport-core-Support-closefrom-also-for-glibc.patch
Normal file
@ -0,0 +1,32 @@
|
||||
From 4b64774b6d13ffa4f59dddf947a97d61bcfa2f2e Mon Sep 17 00:00:00 2001
|
||||
From: Jiri Kucera <sanczes@gmail.com>
|
||||
Date: Sun, 25 Jul 2021 11:35:54 +0200
|
||||
Subject: [PATCH] core: Support closefrom also for glibc.
|
||||
|
||||
* src/posix-io.c (_gpgme_io_spawn): Use glibc's closefrom.
|
||||
--
|
||||
|
||||
Since 2.34, glibc introduces closefrom (the implementation
|
||||
follows *BSD standard).
|
||||
|
||||
Signed-off-by: Werner Koch <wk@gnupg.org>
|
||||
---
|
||||
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 */
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
Name: gpgme
|
||||
Version: 1.15.1
|
||||
Release: 2
|
||||
Release: 3
|
||||
Summary: GnuPG Made Easy
|
||||
License: GPLv2+ and LGPLv2+
|
||||
URL: https://gnupg.org/related_software/gpgme/
|
||||
@ -13,6 +13,7 @@ Patch0: 0001-don-t-add-extra-libraries-for-linking.patch
|
||||
Patch1: gpgme-1.3.2-largefile.patch
|
||||
# Let's fix stupid AX_PYTHON_DEVEL
|
||||
Patch2: 0001-fix-stupid-ax_python_devel.patch
|
||||
Patch3: backport-core-Support-closefrom-also-for-glibc.patch
|
||||
|
||||
BuildRequires: autoconf automake gcc gcc-c++ gawk gnupg2 >= 2.1.18
|
||||
BuildRequires: libgpg-error-devel >= 1.24 libassuan-devel >= 2.4.2
|
||||
@ -144,6 +145,12 @@ fi
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue Aug 10 2021 yixiangzhike <zhangxingliang3@huawei.com> - 1.15.1-3
|
||||
- Type:bugfix
|
||||
- CVE:NA
|
||||
- SUG:NA
|
||||
- DESC:fix the compilation failure with new version glibc (glibc-2.34)
|
||||
|
||||
* Thu Jul 22 2021 yangzhuangzhuang <yangzhuangzhuang1@huawei.com> - 1.15.1-2
|
||||
- Type:enhancement
|
||||
- CVE:NA
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user