Patch libgpg-error for wheezy mingw compatibility
authorAndre Heinecke <aheinecke@intevation.de>
Tue, 5 Jul 2016 09:17:07 +0000 (11:17 +0200)
committerAndre Heinecke <aheinecke@intevation.de>
Tue, 5 Jul 2016 09:17:07 +0000 (11:17 +0200)
* patches/libgpg-error-1.23/
0001-Define-EWOULDBLOCK-in-case-it-is-not-defined.patch: New.
* Makefile.am (EXTRA_DIST): Update accordingly.

Makefile.am
patches/libgpg-error-1.23/0001-Define-EWOULDBLOCK-in-case-it-is-not-defined.patch [new file with mode: 0755]

index c23de0e..6ebb285 100644 (file)
@@ -51,7 +51,8 @@ EXTRA_DIST = autogen.sh README.GIT ONEWS \
                patches/libassuan-2.4.0/0001-Fix-windows-build-with-mingw-w64-2.0.x.patch \
         patches/gpgex-1.0.4/0001-Prefer-kleowrapped-gpgwrapped-binaries.patch \
         patches/gpgol-1.4.0/0001-Fix-UI-Server-startup.patch \
-        patches/gpgol-1.4.0/0002-Ignore-sent-S-MIME-Mails-if-S-MIME-is-disabled.patch
+        patches/gpgol-1.4.0/0002-Ignore-sent-S-MIME-Mails-if-S-MIME-is-disabled.patch \
+        patches/libgpg-error-1.23/0001-Define-EWOULDBLOCK-in-case-it-is-not-defined.patch
 
 copy-news:
        cp NEWS doc/website/NEWS.last
diff --git a/patches/libgpg-error-1.23/0001-Define-EWOULDBLOCK-in-case-it-is-not-defined.patch b/patches/libgpg-error-1.23/0001-Define-EWOULDBLOCK-in-case-it-is-not-defined.patch
new file mode 100755 (executable)
index 0000000..5d8e204
--- /dev/null
@@ -0,0 +1,35 @@
+#! /bin/sh
+patch -p1 -l -f $* < $0
+exit $?
+
+From 65e967627b3d60f550c7d302227dcf9f797e437f Mon Sep 17 00:00:00 2001
+From: Andre Heinecke <aheinecke@intevation.de>
+Date: Mon, 4 Jul 2016 16:19:50 +0200
+Subject: [PATCH] Define EWOULDBLOCK in case it is not defined
+
+* src/estream.c (EWOULDBLOCK): Define fallback.
+
+--
+Older mingw versions (2.0) do not define EWOULDBLOCK in errno.h
+---
+ src/estream.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/src/estream.c b/src/estream.c
+index 4352df5..4cc72ba 100644
+--- a/src/estream.c
++++ b/src/estream.c
+@@ -130,6 +130,11 @@
+ # define O_NONBLOCK  0  /* FIXME: Not yet supported.  */
+ #endif
+
++#if !defined (EWOULDBLOCK) && defined (HAVE_W32_SYSTEM)
++/* Compatibility with errno.h from mingw-2.0 */
++# define EWOULDBLOCK 140
++#endif
++
+ #ifndef EAGAIN
+ # define EAGAIN  EWOULDBLOCK
+ #endif
+--
+2.1.4