summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/gpgme/gpgme/0001-use-closefrom-on-linux-and-glibc-2.34.patch
blob: 1c46684c6dc0dd1ac3df42a4cbcbe750ce062fbb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
From adb1d4e5498a19e9d591ac8f42f9ddfdb23a1354 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 15 Jul 2021 12:33:13 -0700
Subject: [PATCH] use closefrom() on linux and glibc 2.34+

Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 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..ab8ded9 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__) && __GNUC_PREREQ(2, 34))
             closefrom (fd);
             max_fds = fd;
 #else /*!__sun */