HomePhabricator

[CMAKE] Fix getentropy detection on OSX

Description

[CMAKE] Fix getentropy detection on OSX

Summary:
OSX needs both unistd.h and sys/random.h in order to define
getentropy().

Test Plan:
On OSX:

cmake -GNinja ..

Check the first getentropy (only unistd.h) fails, and the second one
(both unistd.h and sys/random.h) succeeds.

Run the OSX gitian build.

Reviewers: #bitcoin_abc, deadalnix, jasonbcox

Reviewed By: #bitcoin_abc, deadalnix, jasonbcox

Differential Revision: https://reviews.bitcoinabc.org/D5007

Details

Provenance
FabienAuthored on Jan 17 2020, 21:36
FabienPushed on Jan 17 2020, 22:29
Reviewer
Restricted Project
Differential Revision
D5007: [CMAKE] Fix getentropy detection on OSX
Parents
rSTAGING56a37f9d7cb5: [CMAKE] Fix daemon() detection on OSX
Branches
Unknown
Tags
Unknown
References
tag: phabricator/base/15627