Skip to content

Commit ca7b77b

Browse files
committed
add miniupnpc detection patch
1 parent 7ebfd73 commit ca7b77b

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
From 58aa0c46860bc1700d3277222a9d5ddf37721d65 Mon Sep 17 00:00:00 2001
2+
From: Moritz Warning <moritzwarning@web.de>
3+
Date: Mon, 23 Apr 2018 22:12:31 +0200
4+
Subject: [PATCH] find miniupnpc.h in staging directory
5+
6+
---
7+
make-linux.mk | 4 ++--
8+
1 file changed, 2 insertions(+), 2 deletions(-)
9+
10+
diff --git a/make-linux.mk b/make-linux.mk
11+
index c318c785..5b271b0a 100644
12+
--- a/make-linux.mk
13+
+++ b/make-linux.mk
14+
@@ -22,8 +22,8 @@ ONE_OBJS+=osdep/LinuxEthernetTap.o
15+
# otherwise build into binary as done on Mac and Windows.
16+
ONE_OBJS+=osdep/PortMapper.o
17+
override DEFS+=-DZT_USE_MINIUPNPC
18+
-MINIUPNPC_IS_NEW_ENOUGH=$(shell grep -sqr '.*define.*MINIUPNPC_VERSION.*"2..*"' /usr/include/miniupnpc/miniupnpc.h && echo 1)
19+
-#MINIUPNPC_IS_NEW_ENOUGH=$(shell grep -sqr '.*define.*MINIUPNPC_VERSION.*"2.."' /usr/include/miniupnpc/miniupnpc.h && echo 1)
20+
+MINIUPNPC_IS_NEW_ENOUGH=$(shell grep -sqr '.*define.*MINIUPNPC_VERSION.*"2..*"' $(STAGING_DIR)/usr/include/miniupnpc/miniupnpc.h && echo 1)
21+
+#MINIUPNPC_IS_NEW_ENOUGH=$(shell grep -sqr '.*define.*MINIUPNPC_VERSION.*"2.."' $(STAGING_DIR)/usr/include/miniupnpc/miniupnpc.h && echo 1)
22+
ifeq ($(MINIUPNPC_IS_NEW_ENOUGH),1)
23+
override DEFS+=-DZT_USE_SYSTEM_MINIUPNPC
24+
LDLIBS+=-lminiupnpc
25+
--
26+
2.16.3
27+

0 commit comments

Comments
 (0)