-
-
Save carloscarcamo/c88c668fa801d75c094b71ad4d23a72f to your computer and use it in GitHub Desktop.
fix for compile issue encountered in https://github.com/rvm/rvm/issues/4000
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/random.c b/random.c | |
index e669e98..9334921 100644 | |
--- a/random.c | |
+++ b/random.c | |
@@ -521,7 +521,7 @@ fill_random_bytes_syscall(void *seed, size_t size, int unused) | |
CryptGenRandom(prov, size, seed); | |
return 0; | |
} | |
-#elif defined __linux__ && defined SYS_getrandom | |
+#elif defined __linux__ && defined __NR_getrandom | |
#include <linux/random.h> | |
# ifndef GRND_NONBLOCK | |
@@ -538,7 +538,7 @@ fill_random_bytes_syscall(void *seed, size_t size, int need_secure) | |
if (!need_secure) | |
flags = GRND_NONBLOCK; | |
errno = 0; | |
- ret = syscall(SYS_getrandom, seed, size, flags); | |
+ ret = syscall(__NR_getrandom, seed, size, flags); | |
if (errno == ENOSYS) { | |
ATOMIC_SET(try_syscall, 0); | |
return -1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment