aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPietro Cerutti <[email protected]>2017-04-03 08:31:40 +0000
committerWerner Koch <[email protected]>2017-04-03 10:25:57 +0000
commit50565982cdd502c3852fcc6f598932bd32b5cdc3 (patch)
tree21c1112ed0b6aaa2050d7d0f02a310470358c118
parentqt: pass fmt to gpgrt_asprintf() (diff)
downloadgpgme-50565982cdd502c3852fcc6f598932bd32b5cdc3.tar.gz
gpgme-50565982cdd502c3852fcc6f598932bd32b5cdc3.zip
FreeBSD's closefrom(2) does not return errors
-rw-r--r--src/posix-io.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/posix-io.c b/src/posix-io.c
index a351806f..14856df1 100644
--- a/src/posix-io.c
+++ b/src/posix-io.c
@@ -473,7 +473,7 @@ _gpgme_io_spawn (const char *path, char *const argv[], unsigned int flags,
* have closefrom(2) we first figure out the highest fd we
* do not want to close, then call closefrom, and on success
* use the regular code to close all fds up to the start
- * point of closefrom. Note that Solaris' closefrom does
+ * point of closefrom. Note that Solaris' and FreeBSD's closefrom do
* not return errors. */
#ifdef HAVE_CLOSEFROM
{
@@ -482,7 +482,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++;
-#ifdef __sun
+#if defined(__sun) || defined(__FreeBSD__)
closefrom (fd);
max_fds = fd;
#else /*!__sun */