Skip to content

Commit 126999d

Browse files
theunifanquake
authored andcommitted
depends: fix zmq build with mingw < 4.0
1 parent 387879d commit 126999d

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

depends/packages/zeromq.mk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ $(package)_version=4.2.2
33
$(package)_download_path=https://github.com/zeromq/libzmq/releases/download/v$($(package)_version)/
44
$(package)_file_name=$(package)-$($(package)_version).tar.gz
55
$(package)_sha256_hash=5b23f4ca9ef545d5bd3af55d305765e3ee06b986263b31967435d285a3e6df6b
6+
$(package)_patches=0001-fix-build-with-older-mingw64.patch
67

78
define $(package)_set_vars
89
$(package)_config_opts=--without-docs --disable-shared --without-libsodium --disable-curve --disable-curve-keygen --disable-perf
@@ -11,6 +12,7 @@ define $(package)_set_vars
1112
endef
1213

1314
define $(package)_preprocess_cmds
15+
patch -p1 < $($(package)_patch_dir)/0001-fix-build-with-older-mingw64.patch && \
1416
./autogen.sh
1517
endef
1618

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
From 1a159c128c69a42d90819375c06a39994f3fbfc1 Mon Sep 17 00:00:00 2001
2+
From: Cory Fields <cory-nospam-@coryfields.com>
3+
Date: Tue, 28 Nov 2017 20:33:25 -0500
4+
Subject: [PATCH] fix build with older mingw64
5+
6+
---
7+
src/windows.hpp | 7 +++++++
8+
1 file changed, 7 insertions(+)
9+
10+
diff --git a/src/windows.hpp b/src/windows.hpp
11+
index 99e889d..e69038e 100644
12+
--- a/src/windows.hpp
13+
+++ b/src/windows.hpp
14+
@@ -55,6 +55,13 @@
15+
#include <winsock2.h>
16+
#include <windows.h>
17+
#include <mswsock.h>
18+
+
19+
+#if defined __MINGW64_VERSION_MAJOR && __MINGW64_VERSION_MAJOR < 4
20+
+// Workaround for mingw-w64 < v4.0 which did not include ws2ipdef.h in iphlpapi.h.
21+
+// Fixed in mingw-w64 by 9bd8fe9148924840d315b4c915dd099955ea89d1.
22+
+#include <ws2def.h>
23+
+#include <ws2ipdef.h>
24+
+#endif
25+
#include <iphlpapi.h>
26+
27+
#if !defined __MINGW32__
28+
--
29+
2.7.4
30+

0 commit comments

Comments
 (0)