mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-21 15:50:07 +01:00
build: Replace MAC_OSX macro with existing __APPLE__
Adopting `__APPLE__` aligns our project with broader industry practices, including those in prominent projects such as the Linux kernel (and even our own code). See: https://sourceforge.net/p/predef/wiki/OperatingSystems/#macos
This commit is contained in:
@@ -34,7 +34,7 @@
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_GETRANDOM) || (defined(HAVE_GETENTROPY_RAND) && defined(MAC_OSX))
|
||||
#if defined(HAVE_GETRANDOM) || (defined(HAVE_GETENTROPY_RAND) && defined(__APPLE__))
|
||||
#include <sys/random.h>
|
||||
#endif
|
||||
|
||||
@@ -387,7 +387,7 @@ void GetOSRand(unsigned char *ent32)
|
||||
The function call is always successful.
|
||||
*/
|
||||
arc4random_buf(ent32, NUM_OS_RANDOM_BYTES);
|
||||
#elif defined(HAVE_GETENTROPY_RAND) && defined(MAC_OSX)
|
||||
#elif defined(HAVE_GETENTROPY_RAND) && defined(__APPLE__)
|
||||
if (getentropy(ent32, NUM_OS_RANDOM_BYTES) != 0) {
|
||||
RandFailure();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user