GPGME 1.16 build error

Werner Koch wk at gnupg.org
Fri Dec 17 14:04:24 CET 2021


On Thu, 16 Dec 2021 15:25, Robert J. Hansen said:

> posix-io.c:577:23: error: void value not ignored as it ought to be
>   577 |             while ((i = closefrom (fd)) && errno == EINTR)
>       |                       ^

--8<---------------cut here---------------start------------->8---
commit 4b64774b6d13ffa4f59dddf947a97d61bcfa2f2e
Author:     Jiri Kucera <sanczes at gmail.com>
AuthorDate: Sun Jul 25 11:35:54 2021 +0200

    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).


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 */
--8<---------------cut here---------------end--------------->8---

Yes, we should do a new release.


Salam-Shalom,

   Werner

-- 
Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 227 bytes
Desc: not available
URL: <https://lists.gnupg.org/pipermail/gnupg-devel/attachments/20211217/c80f7f24/attachment.sig>


More information about the Gnupg-devel mailing list