diff options
author | Jiri Kucera <[email protected]> | 2021-07-25 09:35:54 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2021-07-27 08:52:13 +0000 |
commit | 4b64774b6d13ffa4f59dddf947a97d61bcfa2f2e (patch) | |
tree | 0d5bb6cac4d3716b8ff18b34241c38bc4d2f45ca | |
parent | core: Ensure gpg.conf for tests is recreated if necessary (diff) | |
download | gpgme-4b64774b6d13ffa4f59dddf947a97d61bcfa2f2e.tar.gz gpgme-4b64774b6d13ffa4f59dddf947a97d61bcfa2f2e.zip |
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 <[email protected]>
-rw-r--r-- | src/posix-io.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/posix-io.c b/src/posix-io.c index e712ef28..2a3a81fc 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 */ |