mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-28 06:13:31 +01:00
Merge remote-tracking branch 'sjmurdoch/bug1983-port-tor-fw-helper-to-windows'
This commit is contained in:
commit
0530e80e5d
@ -555,9 +555,12 @@ dnl There are no packages for Debian or Redhat as of this patch
|
||||
|
||||
if test "$natpmp" = "true"; then
|
||||
AC_DEFINE(NAT_PMP, 1, [Define to 1 if we are building with nat-pmp.])
|
||||
TOR_SEARCH_LIBRARY(libnatpmp, $trylibnatpmpdir, [-lnatpmp],
|
||||
[#include <natpmp.h>],
|
||||
TOR_SEARCH_LIBRARY(libnatpmp, $trylibnatpmpdir, [-lnatpmp $TOR_LIB_WS32 $TOR_LIB_IPHLPAPI],
|
||||
[#include <natpmp.h>],
|
||||
[#ifdef MS_WINDOWS
|
||||
#define STATICLIB
|
||||
#endif
|
||||
#include <natpmp.h>],
|
||||
[ int r;
|
||||
natpmp_t natpmp;
|
||||
natpmpresp_t response;
|
||||
|
@ -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 =
|
||||
|
@ -9,11 +9,13 @@
|
||||
|
||||
#include "orconfig.h"
|
||||
#ifdef NAT_PMP
|
||||
#ifdef MS_WINDOWS
|
||||
#define STATICLIB
|
||||
#endif
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <arpa/inet.h>
|
||||
|
||||
// debugging stuff
|
||||
#include <assert.h>
|
||||
@ -82,7 +84,7 @@ tor_natpmp_cleanup(tor_fw_options_t *tor_fw_options, void *backend_state)
|
||||
|
||||
/** Use select() to wait until we can read on fd. */
|
||||
static int
|
||||
wait_until_fd_readable(int fd, struct timeval *timeout)
|
||||
wait_until_fd_readable(unsigned int fd, struct timeval *timeout)
|
||||
{
|
||||
int r;
|
||||
fd_set fds;
|
||||
|
Loading…
Reference in New Issue
Block a user