summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/gpgme/gpgme/0001-use-closefrom-on-linux-and-glibc-2.34.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-support/gpgme/gpgme/0001-use-closefrom-on-linux-and-glibc-2.34.patch')
-rw-r--r--meta/recipes-support/gpgme/gpgme/0001-use-closefrom-on-linux-and-glibc-2.34.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/meta/recipes-support/gpgme/gpgme/0001-use-closefrom-on-linux-and-glibc-2.34.patch b/meta/recipes-support/gpgme/gpgme/0001-use-closefrom-on-linux-and-glibc-2.34.patch
new file mode 100644
index 0000000000..3d05808d63
--- /dev/null
+++ b/meta/recipes-support/gpgme/gpgme/0001-use-closefrom-on-linux-and-glibc-2.34.patch
@@ -0,0 +1,28 @@
1From e1fc4b06dcb62e1c2d85ae99f39ef1a8860570e1 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 15 Jul 2021 12:33:13 -0700
4Subject: [PATCH] use closefrom() on linux and glibc 2.34+
5
6Upstream-Status: Pending
7Signed-off-by: Khem Raj <raj.khem@gmail.com>
8
9Rebase to 1.17.0
10Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
11
12---
13 src/posix-io.c | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16diff --git a/src/posix-io.c b/src/posix-io.c
17index a422d8f..0d0a98b 100644
18--- a/src/posix-io.c
19+++ b/src/posix-io.c
20@@ -577,7 +577,7 @@ _gpgme_io_spawn (const char *path, char *const argv[], unsigned int flags,
21 if (fd_list[i].fd > fd)
22 fd = fd_list[i].fd;
23 fd++;
24-#if defined(__sun) || defined(__FreeBSD__) || defined(__GLIBC__)
25+#if defined(__sun) || defined(__FreeBSD__) || (defined(__GLIBC__) && __GNUC_PREREQ(2, 34))
26 closefrom (fd);
27 max_fds = fd;
28 #else /*!__sun */