Skip to content

Commit f098193

Browse files
debohmandevnexen
authored andcommitted
GH-9464: Fix build on older macOs releases.
A simple check for CommonCrypto/CommonRandom.h does not work on earlier macOS. Must also pull in sys/types.h for size_t, Availability.h for __OSX_AVAILABLE_STARTING, and CommonCrypto/CommonCryptoError.h for CCCryptorStatus. Closes GH-9479.
1 parent 349fdc9 commit f098193

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,12 @@ PHP NEWS
66
. Fixed bug GH-9259 (opcache.interned_strings_buffer setting integer
77
overflow). (Arnaud)
88

9+
- Random:
10+
. Fixed bug GH-9464 (build on older macOs releases). (David Bohman)
11+
912
- Standard:
1013
. Marked crypt()'s $string parameter as #[\SensitiveParameter]. (timwolla)
14+
. Fixed bug GH-9464 (build on older macOs releases). (David Bohman)
1115

1216
01 Sep 2022, PHP 8.2.0RC1
1317

ext/random/config.m4

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,12 @@ dnl
77
dnl Check for CCRandomGenerateBytes
88
dnl header absent in previous macOs releases
99
dnl
10-
AC_CHECK_HEADERS([CommonCrypto/CommonRandom.h])
10+
AC_CHECK_HEADERS([CommonCrypto/CommonRandom.h], [], [],
11+
[
12+
#include <sys/types.h>
13+
#include <Availability.h>
14+
#include <CommonCrypto/CommonCryptoError.h>
15+
])
1116

1217
dnl
1318
dnl Setup extension

ext/standard/config.m4

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,12 @@ dnl
407407
dnl Check for CCRandomGenerateBytes
408408
dnl header absent in previous macOs releases
409409
dnl
410-
AC_CHECK_HEADERS([CommonCrypto/CommonRandom.h])
410+
AC_CHECK_HEADERS([CommonCrypto/CommonRandom.h], [], [],
411+
[
412+
#include <sys/types.h>
413+
#include <Availability.h>
414+
#include <CommonCrypto/CommonCryptoError.h>
415+
])
411416

412417
dnl
413418
dnl Check for argon2

0 commit comments

Comments
 (0)