Skip to content

Commit 0e4224d

Browse files
committed
Fix condition in preprocessor statement
Use own symbol CAN_USE_SECRANDOM instead of macOS version
1 parent 8d0f020 commit 0e4224d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/chacha20poly1305.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ static size_t read_urandom(void* buf, size_t n)
417417

418418
static size_t entropy(void* buf, size_t n)
419419
{
420-
#if defined(__APPLE__) && MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
420+
#if defined(__APPLE__) && CAN_USE_SECRANDOM()
421421
if (SecRandomCopyBytes(kSecRandomDefault, n, (uint8_t*) buf) == 0)
422422
return n;
423423
#elif defined(__linux__) && defined(SYS_getrandom)

0 commit comments

Comments
 (0)