Mailing List Archive

GPGME 1.16 build error
make[1]: Entering directory '/home/rjh/Downloads/gpgme-1.16.0/src'
/bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I.
-I../conf -I/usr/local/include -I/usr/local/include -g -O2 -Wall
-Wcast-align -Wshadow -Wstrict-prototypes -Wno-format-y2k
-Wno-missing-field-initializers -Wno-sign-compare
-Wno-format-zero-length -Wno-format-truncation -Wno-sizeof-pointer-div
-MT posix-io.lo -MD -MP -MF .deps/posix-io.Tpo -c -o posix-io.lo posix-io.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../conf
-I/usr/local/include -I/usr/local/include -g -O2 -Wall -Wcast-align
-Wshadow -Wstrict-prototypes -Wno-format-y2k
-Wno-missing-field-initializers -Wno-sign-compare
-Wno-format-zero-length -Wno-format-truncation -Wno-sizeof-pointer-div
-MT posix-io.lo -MD -MP -MF .deps/posix-io.Tpo -c posix-io.c -fPIC
-DPIC -o .libs/posix-io.o
posix-io.c: In function '_gpgme_io_spawn':
posix-io.c:577:23: error: void value not ignored as it ought to be
577 | while ((i = closefrom (fd)) && errno == EINTR)
| ^

System is Pop!_OS 21.10 x64, with GCC 11.2.0.

_______________________________________________
Gnupg-devel mailing list
Gnupg-devel@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-devel
Re: GPGME 1.16 build error [ In reply to ]
On Donnerstag, 16. Dezember 2021 21:25:33 CET Robert J. Hansen via Gnupg-devel
wrote:
> posix-io.c: In function '_gpgme_io_spawn':
> posix-io.c:577:23: error: void value not ignored as it ought to be
> 577 | while ((i = closefrom (fd)) && errno == EINTR)
>
> | ^
>
> System is Pop!_OS 21.10 x64, with GCC 11.2.0.

This was fixed with
https://dev.gnupg.org/rM4b64774b6d13ffa4f59dddf947a97d61bcfa2f2e

Regards,
Ingo
Re: GPGME 1.16 build error [ In reply to ]
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@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.