From 5dbfb1b3e0efc95be34ba7d69852511c9bac1f4b Mon Sep 17 00:00:00 2001 From: Steven Murdoch Date: Wed, 30 Nov 2011 19:37:17 +0000 Subject: Support NAT-PMP on Windows - Link in libws32 and libiphlpapi, needed for libnatpmp (both in ./configure and when compiling tor-fw-helper-natpmp.c) - Define STATICLIB under Windows, to allow tor-fw-helper-natpmp.c to link - Don't include arpa/inet.h which isn't present in Mingw32 and doesn't appear to be needed on either Windows or MacOS X --- src/tools/tor-fw-helper/Makefile.am | 2 +- src/tools/tor-fw-helper/tor-fw-helper-natpmp.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src/tools') diff --git a/src/tools/tor-fw-helper/Makefile.am b/src/tools/tor-fw-helper/Makefile.am index 8f64ad2ba3..393562db03 100644 --- a/src/tools/tor-fw-helper/Makefile.am +++ b/src/tools/tor-fw-helper/Makefile.am @@ -15,7 +15,7 @@ noinst_HEADERS = \ if NAT_PMP nat_pmp_ldflags = @TOR_LDFLAGS_libnatpmp@ -nat_pmp_ldadd = -lnatpmp +nat_pmp_ldadd = -lnatpmp @TOR_LIB_IPHLPAPI@ nat_pmp_cppflags = @TOR_CPPFLAGS_libnatpmp@ else nat_pmp_ldflags = diff --git a/src/tools/tor-fw-helper/tor-fw-helper-natpmp.c b/src/tools/tor-fw-helper/tor-fw-helper-natpmp.c index f9d5d0d586..a8cdbbf24a 100644 --- a/src/tools/tor-fw-helper/tor-fw-helper-natpmp.c +++ b/src/tools/tor-fw-helper/tor-fw-helper-natpmp.c @@ -9,11 +9,13 @@ #include "orconfig.h" #ifdef NAT_PMP +#ifdef MS_WINDOWS +#define STATICLIB +#endif #include #include #include #include -#include // debugging stuff #include -- cgit v1.2.3-54-g00ecf