All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2, 1/1] package/libgpgme: fix build with glibc >= 2.34
@ 2021-09-06 16:39 Fabrice Fontaine
  2021-09-19 12:05 ` Arnout Vandecappelle
  0 siblings, 1 reply; 2+ messages in thread
From: Fabrice Fontaine @ 2021-09-06 16:39 UTC (permalink / raw)
  To: buildroot; +Cc: Fabrice Fontaine

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 <fontaine.fabrice@gmail.com>
---
Changes v1 -> v2:
 - Use upstream commit

 ...ore-Support-closefrom-also-for-glibc.patch | 36 +++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 package/libgpgme/0001-core-Support-closefrom-also-for-glibc.patch

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 <sanczes@gmail.com>
+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 <wk@gnupg.org>
+
+[Retrieved from:
+https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gpgme.git;a=commit;h=4b64774b6d13ffa4f59dddf947a97d61bcfa2f2e]
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+---
+ 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
+
-- 
2.33.0

_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Buildroot] [PATCH v2, 1/1] package/libgpgme: fix build with glibc >= 2.34
  2021-09-06 16:39 [Buildroot] [PATCH v2, 1/1] package/libgpgme: fix build with glibc >= 2.34 Fabrice Fontaine
@ 2021-09-19 12:05 ` Arnout Vandecappelle
  0 siblings, 0 replies; 2+ messages in thread
From: Arnout Vandecappelle @ 2021-09-19 12:05 UTC (permalink / raw)
  To: Fabrice Fontaine, buildroot



On 06/09/2021 18:39, Fabrice Fontaine wrote:
> 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 <fontaine.fabrice@gmail.com>

  Applied to master, thanks.

  Regards,
  Arnout

> ---
> Changes v1 -> v2:
>   - Use upstream commit
> 
>   ...ore-Support-closefrom-also-for-glibc.patch | 36 +++++++++++++++++++
>   1 file changed, 36 insertions(+)
>   create mode 100644 package/libgpgme/0001-core-Support-closefrom-also-for-glibc.patch
> 
> 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 <sanczes@gmail.com>
> +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 <wk@gnupg.org>
> +
> +[Retrieved from:
> +https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gpgme.git;a=commit;h=4b64774b6d13ffa4f59dddf947a97d61bcfa2f2e]
> +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +---
> + 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
> +
> 
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-09-19 12:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-06 16:39 [Buildroot] [PATCH v2, 1/1] package/libgpgme: fix build with glibc >= 2.34 Fabrice Fontaine
2021-09-19 12:05 ` Arnout Vandecappelle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.