#20530: undefined reference to 'munmap' and 'mmap' building tor on Windows -------------------------------------------------+------------------------- Reporter: ice | Owner: Type: defect | Status: | needs_review Priority: Medium | Milestone: Tor: | 0.2.9.x-final Component: Core Tor/Tor | Version: Tor: | unspecified Severity: Normal | Resolution: Keywords: windows, mingw, backport, | Actual Points: 0.3 029-proposed, CoreTorTeam201611 | Parent ID: | Points: 0.3 Reviewer: | Sponsor: -------------------------------------------------+------------------------- Changes (by teor):
* status: new => needs_review * version: => Tor: unspecified * milestone: Tor: 0.3.0.x-final => Tor: 0.2.9.x-final * points: => 0.3 * actualpoints: => 0.3 * keywords: windows, mingw, backport => windows, mingw, backport, 029-proposed, CoreTorTeam201611 Comment: Ok, so we need to prefer sys/mman.h when it's available, even on Windows, so Cygwin can handle mmap() and fork() correctly. (Although this is not so important now, because Tor uses threads, rather than forking.) I think tor is missing a check for getpagesize, and that's causing the problem. We could also check for linkage to the mmap, munmap, and getpagesize functions, but I'm going to leave that for now, because other environments replace those functions using macros. (There would be nothing to link to, even though the code is correct.) Can you please test this branch? https://github.com/teor2345/tor/tree/fix-mingw-pagesize -- Ticket URL: <https://trac.torproject.org/projects/tor/ticket/20530#comment:8> Tor Bug Tracker & Wiki <https://trac.torproject.org/> The Tor Project: anonymity online _______________________________________________ tor-bugs mailing list tor-bugs@lists.torproject.org https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs