1From 4b64774b6d13ffa4f59dddf947a97d61bcfa2f2e Mon Sep 17 00:00:00 2001 2From: Jiri Kucera <sanczes@gmail.com> 3Date: Sun, 25 Jul 2021 11:35:54 +0200 4Subject: [PATCH] core: Support closefrom also for glibc. 5 6* src/posix-io.c (_gpgme_io_spawn): Use glibc's closefrom. 7-- 8 9Since 2.34, glibc introduces closefrom (the implementation 10follows *BSD standard). 11 12Signed-off-by: Werner Koch <wk@gnupg.org> 13 14[Retrieved from: 15https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gpgme.git;a=commit;h=4b64774b6d13ffa4f59dddf947a97d61bcfa2f2e] 16Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> 17--- 18 src/posix-io.c | 2 +- 19 1 file changed, 1 insertion(+), 1 deletion(-) 20 21diff --git a/src/posix-io.c b/src/posix-io.c 22index e712ef28..2a3a81fc 100644 23--- a/src/posix-io.c 24+++ b/src/posix-io.c 25@@ -570,7 +570,7 @@ _gpgme_io_spawn (const char *path, char *const argv[], unsigned int flags, 26 if (fd_list[i].fd > fd) 27 fd = fd_list[i].fd; 28 fd++; 29-#if defined(__sun) || defined(__FreeBSD__) 30+#if defined(__sun) || defined(__FreeBSD__) || defined(__GLIBC__) 31 closefrom (fd); 32 max_fds = fd; 33 #else /*!__sun */ 34-- 352.11.0 36 37