external/gpgmepp/UnpackedTarball_gpgmepp.mk                                 |  
  1 
 external/gpgmepp/gpgme.git-4b64774b6d13ffa4f59dddf947a97d61bcfa2f2e.patch.1 |  
 32 ++++++++++
 2 files changed, 33 insertions(+)

New commits:
commit f60214a1ad45f947d063e4cfdbeb86bd819ab87c
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Fri Oct 8 17:06:01 2021 +0300
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Mon Oct 11 09:07:14 2021 +0200

    Fix gpgmepp build with glibc
    
    posix-io.c: In function '_gpgme_io_spawn':
    posix-io.c:492:23: error: void value not ignored as it ought to be
      492 |             while ((i = closefrom (fd)) && errno == EINTR)
          |                       ^
    make[1]: *** [Makefile:964: posix-io.lo] Error 1
    
    Change-Id: I0e7abc33200ca7436c72e925447e681fd241c6a7
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123259
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/external/gpgmepp/UnpackedTarball_gpgmepp.mk 
b/external/gpgmepp/UnpackedTarball_gpgmepp.mk
index 2e9eb3d826ff..b314357734ab 100644
--- a/external/gpgmepp/UnpackedTarball_gpgmepp.mk
+++ b/external/gpgmepp/UnpackedTarball_gpgmepp.mk
@@ -34,5 +34,6 @@ $(eval $(call gb_UnpackedTarball_add_patches,gpgmepp, \
     external/gpgmepp/c++20.patch \
     external/gpgmepp/clang-cl.patch \
     external/gpgmepp/configure.patch \
+    
external/gpgmepp/gpgme.git-4b64774b6d13ffa4f59dddf947a97d61bcfa2f2e.patch.1 \
 ))
 # vim: set noet sw=4 ts=4:
diff --git 
a/external/gpgmepp/gpgme.git-4b64774b6d13ffa4f59dddf947a97d61bcfa2f2e.patch.1 
b/external/gpgmepp/gpgme.git-4b64774b6d13ffa4f59dddf947a97d61bcfa2f2e.patch.1
new file mode 100644
index 000000000000..8b12c1785ccf
--- /dev/null
+++ 
b/external/gpgmepp/gpgme.git-4b64774b6d13ffa4f59dddf947a97d61bcfa2f2e.patch.1
@@ -0,0 +1,32 @@
+From 4b64774b6d13ffa4f59dddf947a97d61bcfa2f2e Mon Sep 17 00:00:00 2001
+From: Jiri Kucera <sanc...@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 <w...@gnupg.org>
+---
+ 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
+

Reply via email to