diff options
| author | Wladimir J. van der Laan <[email protected]> | 2020-03-19 15:23:12 +0100 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2020-03-19 15:23:51 +0100 |
| commit | 3d3d834324f313328ca1465f28e47e5569721c82 (patch) | |
| tree | 9a8de73672628137317f14ef3057084e231a8f55 /src/script/script_error.cpp | |
| parent | Merge #18378: Bugfix & simplify bn2vch using int.to_bytes (diff) | |
| parent | build: fix sysctl() detection on macOS (diff) | |
| download | discoin-3d3d834324f313328ca1465f28e47e5569721c82.tar.xz discoin-3d3d834324f313328ca1465f28e47e5569721c82.zip | |
Merge #18359: build: fix sysctl() detection on macOS
e90e3e684ffa7b25f0dfb5b45e70bb0c358261fb build: fix sysctl() detection on macOS (fanquake)
Pull request description:
[`sysctl()` on *BSD](https://www.unix.com/man-page/FreeBSD/3/sysctl/) takes a "const int *name", whereas [`sysctl()` on macOS](https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man3/sysctl.3.html)
it takes an "int *name". So our configure check and `sysctl()` detection on
macOS currently fails:
```bash
/usr/include/sys/sysctl.h:759:9: note: candidate function not viable:
no known conversion from 'const int [2]' to 'int *' for 1st argument
int sysctl(int *, u_int, void *, size_t *, void *, size_t);
```
The simplest change seems to be to change the param to a "int *name", which
will work during configure on macOS and *BSD systems.
For consistency I've changed both calls, but note that macOS doesn't
have `KERN_ARND`, so that check will always fail regardless. We can revert/add
documentation if preferred.
ACKs for top commit:
laanwj:
Re-ACK e90e3e684ffa7b25f0dfb5b45e70bb0c358261fb
Tree-SHA512: 29e9348136fc72882f63079bf10d2490e845d7656aae2c003e282bea49dd2778204a7776a67086bd88c2852af9a07dd04ba358eede7e37029e1c10f73c85d6a5
Diffstat (limited to 'src/script/script_error.cpp')
0 files changed, 0 insertions, 0 deletions