Opened 2 years ago

Closed 22 months ago

#20241 closed defect (fixed)

Fix compilation on osx sierra (10.12)

Reported by: nickm Owned by: nickm
Priority: Medium Milestone: Tor: 0.2.9.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: osx, TorCoreTeam201609, 028-backport
Cc: Actual Points: .1
Parent ID: Points:
Reviewer: Sponsor:

Description

OSX Sierra (which came out last week) broke compilation in two ways:

  • It added a getentropy() function, but only if you include sys/random.h (which nobody else seems to require).
  • It added clock_gettime(), but uses a wider type for tv_nsec than tv_usec (why? Where does apple run that provides an "int" that holds up to 1e6, but where you need a "long" to hold 1e9??).
  • It added clock_gettime(), but didn't add pthread_condattr_setclock() (whereas everybody else supports neither or both).

My branch osx_sierra_028 fixes both. I'm going to merge it to master as low-risk so I can keep doing development, and ask for review on getting it into 028.

Child Tickets

Change History (9)

comment:1 Changed 2 years ago by nickm

Actual Points: .1
Keywords: TorCoreTeam201609 added
Owner: set to nickm
Status: newassigned

comment:2 Changed 2 years ago by nickm

Status: assignedneeds_review

comment:3 Changed 2 years ago by nickm

Keywords: review-group-10 added

This is merged in 0.2.9, but I'm calling it review-group-10 for 0.2.8. If you like it, we should leave it in merge_ready until we know whether we're putting another 0.2.8 out before 0.2.9 is stable.

comment:4 Changed 23 months ago by nickm

Keywords: review-group-11 added

Moving these to review-group-11.

comment:5 Changed 23 months ago by nickm

Keywords: review-group-10 removed

comment:6 Changed 23 months ago by teor

Status: needs_reviewmerge_ready

It would be really nice to get this patch into fink/MacPorts/HomeBrew and similar, but it's not urgent, because most macOS users just use tor browser.

These changes look fine, and are low risk on macOS Sierra.

The only risk would be breaking compilation somewhere else.

comment:7 Changed 23 months ago by nickm

Keywords: 028-backport added

comment:8 Changed 22 months ago by nickm

Keywords: review-group-11 removed

comment:9 Changed 22 months ago by nickm

Milestone: Tor: 0.2.8.x-finalTor: 0.2.9.x-final
Resolution: fixed
Status: merge_readyclosed

This change caused some other follow-up issues (#20235) that we had to fix in 0.2.9, so rather than backporting this directly, we took a more brute-force approach in #20865 for 0.2.8.

Note: See TracTickets for help on using tickets.