external/gpgmepp/UnpackedTarball_gpgmepp.mk |    1 +
 external/gpgmepp/w32-include.patch          |   22 ++++++++++++++++++++++
 2 files changed, 23 insertions(+)

New commits:
commit b212163587524f723c737d698919cb4fe4e547e6
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Fri Apr 22 22:07:25 2022 +0200
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Fri Apr 22 23:20:09 2022 +0200

    external/gpgmepp: Missing includes (Windows)
    
    > gpgme-w32spawn.c(288,8): error: call to undeclared function 'open'; ISO 
C99 and later do not support implicit function declarations 
[-Wimplicit-function-declaration]
    >   fd = open (trans_file, O_RDONLY);
    >        ^
    
    etc. with clang-cl 15 trunk after
    
<https://github.com/llvm/llvm-project/commit/7d644e1215b376ec5e915df9ea2eeb56e2d94626>
    "[C11/C2x] Change the behavior of the implicit function declaration 
warning",
    which went unnoticed so far due to the traditionally lax handling of missing
    function declarations in C.
    
    Change-Id: I805ab10d2b0aae3f8b1f46ffeda57aff2bbcef2f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133340
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/external/gpgmepp/UnpackedTarball_gpgmepp.mk 
b/external/gpgmepp/UnpackedTarball_gpgmepp.mk
index 05bfc9f07bf1..f3de8d2c24ff 100644
--- a/external/gpgmepp/UnpackedTarball_gpgmepp.mk
+++ b/external/gpgmepp/UnpackedTarball_gpgmepp.mk
@@ -33,5 +33,6 @@ $(eval $(call gb_UnpackedTarball_add_patches,gpgmepp, \
     external/gpgmepp/clang-cl.patch \
     external/gpgmepp/configure.patch \
     
external/gpgmepp/gpgme.git-4b64774b6d13ffa4f59dddf947a97d61bcfa2f2e.patch.1 \
+    external/gpgmepp/w32-include.patch \
 ))
 # vim: set noet sw=4 ts=4:
diff --git a/external/gpgmepp/w32-include.patch 
b/external/gpgmepp/w32-include.patch
new file mode 100644
index 000000000000..30fdba5f8f26
--- /dev/null
+++ b/external/gpgmepp/w32-include.patch
@@ -0,0 +1,22 @@
+--- src/data-fd.c
++++ src/data-fd.c
+@@ -28,6 +28,9 @@
+ #ifdef HAVE_SYS_TYPES_H
+ # include <sys/types.h>
+ #endif
++#if defined HAVE_W32_SYSTEM
++#include <io.h>
++#endif
+ 
+ #include "debug.h"
+ #include "data.h"
+--- src/gpgme-w32spawn.c
++++ src/gpgme-w32spawn.c
+@@ -36,6 +36,7 @@
+ # include <sys/stat.h>
+ #endif
+ #include <stdint.h>
++#include <io.h>
+ #include <process.h>
+ 
+ #include "priv-io.h"

Reply via email to