1
0

0005-use-external-miniupnpc-and-natpmp.patch 1.2 KB

1234567891011121314151617181920212223242526272829303132
  1. --- a/make-linux.mk
  2. +++ b/make-linux.mk
  3. @@ -64,7 +64,8 @@ ifeq ($(ZT_USE_MINIUPNPC),1)
  4. DEFS+=-DZT_USE_MINIUPNPC
  5. # Auto-detect libminiupnpc at least v2.0
  6. - MINIUPNPC_IS_NEW_ENOUGH=$(shell grep -sqr '.*define.*MINIUPNPC_VERSION.*"2.."' /usr/include/miniupnpc/miniupnpc.h && echo 1)
  7. + #MINIUPNPC_IS_NEW_ENOUGH=$(shell grep -sqr '.*define.*MINIUPNPC_VERSION.*"2.."' $(STAGING_DIR)/usr/include/miniupnpc/miniupnpc.h && echo 1)
  8. + MINIUPNPC_IS_NEW_ENOUGH=1
  9. ifeq ($(MINIUPNPC_IS_NEW_ENOUGH),1)
  10. DEFS+=-DZT_USE_SYSTEM_MINIUPNPC
  11. LDLIBS+=-lminiupnpc
  12. @@ -74,7 +75,7 @@ ifeq ($(ZT_USE_MINIUPNPC),1)
  13. endif
  14. # Auto-detect libnatpmp
  15. - ifeq ($(wildcard /usr/include/natpmp.h),)
  16. + ifeq ($(wildcard $(STAGING_DIR)/usr/include/natpmp.h),)
  17. OBJS+=ext/libnatpmp/natpmp.o ext/libnatpmp/getgateway.o
  18. else
  19. LDLIBS+=-lnatpmp
  20. --- a/osdep/PortMapper.cpp
  21. +++ b/osdep/PortMapper.cpp
  22. @@ -180,7 +180,7 @@ public:
  23. struct IGDdatas data;
  24. int upnpError = 0;
  25. - UPNPDev *devlist = upnpDiscoverAll(5000,(const char *)0,(const char *)0,0,0,2,&upnpError);
  26. + UPNPDev *devlist = upnpDiscoverAll(5000,(const char *)0,(const char *)0,0,0,&upnpError);
  27. if (devlist) {
  28. #ifdef ZT_PORTMAPPER_TRACE