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:
Lőrinc
2024-02-19 13:43:49 +01:00
parent d94adc7270
commit 6c6b2442ed
6 changed files with 9 additions and 12 deletions

View File

@@ -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();
}