diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lj_prng.c | 12 |
1 files changed, 9 insertions, 3 deletions
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; | |||
| 109 | #include <sys/syscall.h> | 109 | #include <sys/syscall.h> |
| 110 | #else | 110 | #else |
| 111 | 111 | ||
| 112 | #if LJ_TARGET_OSX | 112 | #if LJ_TARGET_OSX && !LJ_TARGET_IOS |
| 113 | /* | ||
| 114 | ** In their infinite wisdom Apple decided to disallow getentropy() in the | ||
| 115 | ** iOS App Store. Even though the call is common to all BSD-ish OS, it's | ||
| 116 | ** recommended by Apple in their own security-related docs, and, to top | ||
| 117 | ** off the foolery, /dev/urandom is handled by the same kernel code, | ||
| 118 | ** yet accessing it is actually permitted (but less efficient). | ||
| 119 | */ | ||
| 113 | #include <Availability.h> | 120 | #include <Availability.h> |
| 114 | #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200 || \ | 121 | #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200 |
| 115 | __IPHONE_OS_VERSION_MIN_REQUIRED >= 100000 | ||
| 116 | #define LJ_TARGET_HAS_GETENTROPY 1 | 122 | #define LJ_TARGET_HAS_GETENTROPY 1 |
| 117 | #endif | 123 | #endif |
| 118 | #elif LJ_TARGET_BSD || LJ_TARGET_SOLARIS || LJ_TARGET_CYGWIN | 124 | #elif LJ_TARGET_BSD || LJ_TARGET_SOLARIS || LJ_TARGET_CYGWIN |
