Opened 2 years ago

Closed 2 years ago

Last modified 19 months ago

#4955 closed defect (fixed)

tor-0.2.3.11_alpha: fails to compile when configured --enable-nat-pmp

Reported by: blueness Owned by:
Priority: normal Milestone: Tor: 0.2.3.x-final
Component: Tor Version: Tor: 0.2.3.12-alpha
Keywords: tor-client Cc: blueness@…
Actual Points: Parent ID:
Points:

Description

Version tor-0.2.3.11 introduced a change in src/tools/tor-fw-helper/tor-fw-helper-natpmp.c. A quick diff with 0.2.3.10 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 2 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 2 years ago by nickm

  • Component changed from - Select a component to Tor Client
  • Milestone set to Tor: 0.2.3.x-final

comment:3 Changed 2 years ago by blueness

make[4]: Entering directory `/var/tmp/portage/net-misc/tor-0.2.3.11_alpha/work/tor-0.2.3.11-alpha/src/tools/tor-fw-helper'
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-0.2.3.11_alpha/work/tor-0.2.3.11-alpha/src/tools/tor-fw-helper'
make[3]:
* [all-recursive] Error 1
make[3]: Leaving directory `/var/tmp/portage/net-misc/tor-0.2.3.11_alpha/work/tor-0.2.3.11-alpha/src/tools'
make[2]: * [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/net-misc/tor-0.2.3.11_alpha/work/tor-0.2.3.11-alpha/src'
make[1]:
* [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/net-misc/tor-0.2.3.11_alpha/work/tor-0.2.3.11-alpha'
make: * [all] Error 2

comment:4 Changed 2 years ago by blueness

  • Version changed from Tor: 0.2.3.11-alpha to Tor: 0.2.3.12-alpha

This is still an issue in 0.2.3.12-alpha

comment:5 Changed 2 years ago by Sebastian

  • Status changed from new to needs_review

Sorry this slipped in! branch bug4955 in my repository ( https://gitweb.torproject.org/sebastian/tor.git/shortlog/refs/heads/bug4955 ) 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 2 years ago by nickm

Looks ok to me.

comment:7 Changed 2 years ago by blueness

Works for me.

XXX = Anthony G. Basile <blueness@…>

comment:8 Changed 2 years ago by Sebastian

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

comment:9 Changed 2 years ago by nickm

  • Resolution set to fixed
  • Status changed from needs_review to closed

merged; thanks all

comment:10 Changed 19 months ago by nickm

  • Keywords tor-client added

comment:11 Changed 19 months ago by nickm

  • Component changed from Tor Client to Tor
Note: See TracTickets for help on using tickets.