1
mirror of https://github.com/jedisct1/libsodium.git synced 2024-12-19 10:05:05 -07:00

Bump the minimum iOS version to iOS 9

Add stricter checks for getrandom()/getentropy()
This commit is contained in:
Frank Denis 2019-10-23 18:11:12 +02:00
parent b614cfc37f
commit db64ee1787
2 changed files with 8 additions and 4 deletions

View File

@ -791,7 +791,9 @@ AS_IF([test "x$EMSCRIPTEN" = "x"],[
#endif
]], [[
unsigned char buf;
(void) getrandom((void *) &buf, 1U, 0U);
if (&getrandom != NULL) {
(void) getrandom((void *) &buf, 1U, 0U);
}
]])],
[AC_MSG_RESULT(yes)
AC_CHECK_FUNCS([getrandom])],
@ -809,7 +811,9 @@ unsigned char buf;
#endif
]], [[
unsigned char buf;
(void) getentropy((void *) &buf, 1U);
if (&getentropy != NULL) {
(void) getentropy((void *) &buf, 1U);
}
]])],
[AC_MSG_RESULT(yes)
AC_CHECK_FUNCS([getentropy])],

View File

@ -17,8 +17,8 @@ export SIMULATOR32_PREFIX="$PREFIX/tmp/simulator32"
export SIMULATOR64_PREFIX="$PREFIX/tmp/simulator64"
export XCODEDIR=$(xcode-select -p)
export IOS_SIMULATOR_VERSION_MIN=${IOS_SIMULATOR_VERSION_MIN-"8.0.0"}
export IOS_VERSION_MIN=${IOS_VERSION_MIN-"8.0.0"}
export IOS_SIMULATOR_VERSION_MIN=${IOS_SIMULATOR_VERSION_MIN-"9.0.0"}
export IOS_VERSION_MIN=${IOS_VERSION_MIN-"9.0.0"}
echo
echo "Warnings related to headers being present but not usable are due to functions"