[Buildroot] [PATCH 1/1] package/libgpgme: fix build with glibc >= 2.34
From: Fabrice Fontaine <hidden>
Date: 2021-09-04 22:16:51
Subsystem:
the rest · Maintainer:
Linus Torvalds
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 <redacted>
---
...posix-io.c-fix-build-with-glibc-2.34.patch | 41 +++++++++++++++++++
1 file changed, 41 insertions(+)
create mode 100644 package/libgpgme/0001-src-posix-io.c-fix-build-with-glibc-2.34.patch
diff --git a/package/libgpgme/0001-src-posix-io.c-fix-build-with-glibc-2.34.patch b/package/libgpgme/0001-src-posix-io.c-fix-build-with-glibc-2.34.patch
new file mode 100644
index 0000000000..c3cecbe0b5
--- /dev/null
+++ b/package/libgpgme/0001-src-posix-io.c-fix-build-with-glibc-2.34.patch@@ -0,0 +1,41 @@ +From 0ab732d6265c32db0dececb9d5a46de3b37db0b9 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine <fontaine.fabrice@gmail.com> +Date: Sun, 5 Sep 2021 00:05:00 +0200 +Subject: [PATCH] src/posix-io.c: fix build with glibc >= 2.34 + +Fix the following build failure with glibc >= 2.34 raised because +closefrom doesn't return an int but a void since its addition with +https://github.com/bminor/glibc/commit/607449506f197cc9514408908f41f22537a47a8c + +``` +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 <fontaine.fabrice@gmail.com> +[Upstream status: https://dev.gnupg.org/T5587] +--- + 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..e9485f45 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__) && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 34) + closefrom (fd); + max_fds = fd; + #else /*!__sun */ +-- +2.33.0 +
--
2.33.0
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot