Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#4955 closed defect (fixed)

tor- fails to compile when configured --enable-nat-pmp

Reported by: blueness Owned by:
Priority: Medium Milestone: Tor: 0.2.3.x-final
Component: Core Tor/Tor Version: Tor:
Severity: Keywords: tor-client
Cc: blueness@… Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


Version tor- introduced a change in src/tools/tor-fw-helper/tor-fw-helper-natpmp.c. A quick diff with shows:

--- a/tor-fw-helper-natpmp.c 2011-12-15 11:27:07.000000000 -0500
+++ b/tor-fw-helper-natpmp.c 2012-01-21 22:07:30.000000000 -0500
@@ -87,7 +87,7 @@

/ Use select() to wait until we can read on fd. */
static int

-wait_until_fd_readable(unsigned int fd, struct timeval *timeout)
+wait_until_fd_readable(tor_socket_t fd, struct timeval *timeout)


int r;
fd_set fds;

Its pretty obvious that fd should be defined as an unsigned int. Reverting and everything compiles fine.

Child Tickets

Change History (11)

comment:1 Changed 9 years ago by nickm

On win64, it's gotta be a tor_socket_t; unsigned int isn't wide enough to hold a SOCKET.

What compilation errors are you seeing?

comment:2 Changed 9 years ago by nickm

Component: - Select a componentTor Client
Milestone: Tor: 0.2.3.x-final

comment:3 Changed 9 years ago by blueness

make[4]: Entering directory `/var/tmp/portage/net-misc/tor-'
gcc -DHAVE_CONFIG_H -I. -I../../.. -I../../../src/common -g -O2 -Wall -fno-strict-aliasing -MT tor_fw_helper-tor-fw-helper.o -MD -MP -MF .deps/tor_fw_helper-tor-fw-helper.Tpo -c -o tor_fw_helper-tor-fw-helper.o test -f 'tor-fw-helper.c' || echo './'tor-fw-helper.c
mv -f .deps/tor_fw_helper-tor-fw-helper.Tpo .deps/tor_fw_helper-tor-fw-helper.Po
gcc -DHAVE_CONFIG_H -I. -I../../.. -I../../../src/common -g -O2 -Wall -fno-strict-aliasing -MT tor_fw_helper-tor-fw-helper-natpmp.o -MD -MP -MF .deps/tor_fw_helper-tor-fw-helper-natpmp.Tpo -c -o tor_fw_helper-tor-fw-helper-natpmp.o test -f 'tor-fw-helper-natpmp.c' || echo './'tor-fw-helper-natpmp.c
tor-fw-helper-natpmp.c:90:37: error: expected ‘)’ before ‘fd’
tor-fw-helper-natpmp.c: In function ‘tor_natpmp_add_tcp_mapping’:
tor-fw-helper-natpmp.c:136:5: warning: implicit declaration of function ‘wait_until_fd_readable’
make[4]: * [tor_fw_helper-tor-fw-helper-natpmp.o] Error 1
make[4]: Leaving directory `/var/tmp/portage/net-misc/tor-'
* [all-recursive] Error 1
make[3]: Leaving directory `/var/tmp/portage/net-misc/tor-'
make[2]: * [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/net-misc/tor-'
* [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/net-misc/tor-'
make: * [all] Error 2

comment:4 Changed 9 years ago by blueness

Version: Tor:

This is still an issue in

comment:5 Changed 9 years ago by Sebastian

Status: newneeds_review

Sorry this slipped in! branch bug4955 in my repository ( ) has a trivial fix. Please test & let us know how you'd like to be credited in the bug so whoever merges this can fix the XXX in the changes file.

comment:6 Changed 9 years ago by nickm

Looks ok to me.

comment:7 Changed 9 years ago by blueness

Works for me.

XXX = Anthony G. Basile <blueness@…>

comment:8 Changed 9 years ago by Sebastian

branch force-updated, only change is the name. Thanks.

comment:9 Changed 9 years ago by nickm

Resolution: fixed
Status: needs_reviewclosed

merged; thanks all

comment:10 Changed 8 years ago by nickm

Keywords: tor-client added

comment:11 Changed 8 years ago by nickm

Component: Tor ClientTor
Note: See TracTickets for help on using tickets.