This compiles on macos for x86_64, at least.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4485 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
@ -44,6 +44,12 @@ JSValue _crypt_gensalt(JSContext* context, JSValueConst this_val, int argc, JSVa
|
||||
char buffer[16];
|
||||
#if defined(_WIN32)
|
||||
ssize_t bytes = SystemFunction036(buffer, sizeof(buffer)) ? sizeof(buffer) : 0;
|
||||
#elif defined(__APPLE__)
|
||||
ssize_t bytes = 0;
|
||||
if (getentropy(buffer, sizeof(buffer)) == 0)
|
||||
{
|
||||
bytes = sizeof(buffer);
|
||||
}
|
||||
#else
|
||||
ssize_t bytes = getrandom(buffer, sizeof(buffer), 0);
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user