Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#5861 closed defect (fixed)

MSVC/win32: IPPROTO_IPV6 only defined when _WIN32_WINNT >= 0x0501

Reported by: nickm Owned by:
Priority: High Milestone: Tor: 0.2.3.x-final
Component: Core Tor/Tor Version:
Severity: Keywords: windows msvc tor-relay
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

When we're providing IPv6 support, we need to setsockopt(IPPROTO_IPV6, IPPROTO_IPV6ONLY) on our listeners so that they bind the address we want them to bind.

But with the MS-provided ws2def.h I've got, IPPROTO_IPV6 is only declared when _WIN32_WINNT >= 0x0501 (that is, when we say we want to build for XP or higher).

The easiest fix here would be to just drop support for pre-XP windowses and set _WIN32_WINNT to 0x0501. The next-easiest fix would be to hard-define IPPROTO_IPV6 to 41 when building for windows.

Marking this as "major" because it blocks building with MSVC.

Child Tickets

Change History (4)

comment:1 Changed 7 years ago by nickm

Status: newneeds_review

See branch "win32_winnt", which I could have sworn I already mentioned on some bug ticket.

comment:2 Changed 7 years ago by nickm

Resolution: fixed
Status: needs_reviewclosed

Merged.

comment:3 Changed 7 years ago by nickm

Keywords: tor-relay added

comment:4 Changed 7 years ago by nickm

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