From: Fabrice Fontaine Date: Mon, 6 Sep 2021 16:39:37 +0000 (+0200) Subject: package/libgpgme: fix build with glibc >= 2.34 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=70839f4d519ff0db5a0240c80a757386027735d7;p=buildroot.git package/libgpgme: fix build with glibc >= 2.34 Fix the following build failure with glibc >= 2.34: 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) | ^ Fixes: - http://autobuild.buildroot.org/results/b11094ddd35263071b7dd453a6590c5b684026ff Signed-off-by: Fabrice Fontaine Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- diff --git a/package/libgpgme/0001-core-Support-closefrom-also-for-glibc.patch b/package/libgpgme/0001-core-Support-closefrom-also-for-glibc.patch new file mode 100644 index 0000000000..b8db949cef --- /dev/null +++ b/package/libgpgme/0001-core-Support-closefrom-also-for-glibc.patch @@ -0,0 +1,36 @@ +From 4b64774b6d13ffa4f59dddf947a97d61bcfa2f2e Mon Sep 17 00:00:00 2001 +From: Jiri Kucera +Date: Sun, 25 Jul 2021 11:35:54 +0200 +Subject: [PATCH] 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 + +[Retrieved from: +https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gpgme.git;a=commit;h=4b64774b6d13ffa4f59dddf947a97d61bcfa2f2e] +Signed-off-by: Fabrice Fontaine +--- + src/posix-io.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +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 */ +-- +2.11.0 +