diff --git a/src/lj_prng.c b/src/lj_prng.c index f09aaffa..0c4a5cf0 100644 --- a/src/lj_prng.c +++ b/src/lj_prng.c @@ -109,10 +109,16 @@ static PRGR libfunc_rgr; #include #else -#if LJ_TARGET_OSX +#if LJ_TARGET_OSX && !LJ_TARGET_IOS +/* +** In their infinite wisdom Apple decided to disallow getentropy() in the +** iOS App Store. Even though the call is common to all BSD-ish OS, it's +** recommended by Apple in their own security-related docs, and, to top +** off the foolery, /dev/urandom is handled by the same kernel code, +** yet accessing it is actually permitted (but less efficient). +*/ #include -#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200 || \ - __IPHONE_OS_VERSION_MIN_REQUIRED >= 100000 +#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200 #define LJ_TARGET_HAS_GETENTROPY 1 #endif #elif LJ_TARGET_BSD || LJ_TARGET_SOLARIS || LJ_TARGET_CYGWIN