Opened 4 years ago

Closed 2 years ago

#16432 closed defect (fixed)

patches for NetBSD

Reported by: cypherpunks Owned by: dgoulet
Priority: Medium Milestone:
Component: Core Tor/Torsocks Version:
Severity: Normal Keywords: netbsd
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


The attached patches fix several issues on NetBSD:

  • The cpp conditionals for mmap goo in syscall.c don't match and break on NetBSD.
  • NetBSD <7 incorrectly declared the obsolete gethostbyaddr function to take char * rather than void *.
  • In NetBSD >=4, the ELF symbol for the socket routine in libc is named __socket30; the symbol named socket is a compatibility routine implementing older semantics in terms of the symbol __socket30.

Child Tickets

Attachments (1)

nbsdsym.patch (4.4 KB) - added by cypherpunks 4 years ago.
patch set to fix issues on NetBSD

Download all attachments as: .zip

Change History (5)

Changed 4 years ago by cypherpunks

Attachment: nbsdsym.patch added

patch set to fix issues on NetBSD

comment:1 Changed 3 years ago by dgoulet

Status: newaccepted

Accept a bunch of tickets for torsocks.

comment:2 Changed 3 years ago by dgoulet

Severity: Normal
Status: acceptedneeds_information

I've merged all first three patch. The fourth one confuses me. Why is it better to use negative here? There are much more systems that it might not work with a "blacklist" system than a "whitelist" one.

Should the __NetBSD__ check be removed from that line for it to simply work?

#if (defined(__linux__) || defined(__darwin__) || (defined(__FreeBSD_kernel__) && defined(__i386__)) || defined(__NetBSD__))

comment:3 Changed 3 years ago by cypherpunks

I wrote the conditional to exactly match the conditional around the definition of handle_mmap (with reversed sense). I don't remember exactly what the symptom was, but however the two conditionals are written, surely they ought to match.

comment:4 Changed 2 years ago by dgoulet

Resolution: fixed
Status: needs_informationclosed

Ok last patch merged.


Note: See TracTickets for help on using tickets.