summary refs log tree commit diff
path: root/2048.c
diff options
context:
space:
mode:
Diffstat (limited to '2048.c')
-rw-r--r--2048.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/2048.c b/2048.c
index b042ee0..2eb323e 100644
--- a/2048.c
+++ b/2048.c
@@ -22,11 +22,15 @@
 
 typedef unsigned uint;
 
-#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__OpenBSD__) && (!defined(__GLIBC__) || !__GLIBC_PREREQ(2, 36))
+#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__OpenBSD__)
+#include <features.h>
+#if defined(__GLIBC__) && __GLIBC_PREREQ(2, 36)
+#else
 static uint arc4random_uniform(uint upper_bound) {
 	return rand() % upper_bound;
 }
 #endif
+#endif
 
 static uint score;
 static uint grid[4][4];