summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meson.build2
-rw-r--r--src/glx/glxhash.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/meson.build b/meson.build
index 542c35d525b..8dc431cfc5b 100644
--- a/meson.build
+++ b/meson.build
@@ -1029,7 +1029,7 @@ foreach h : ['xlocale.h', 'sys/sysctl.h', 'linux/futex.h', 'endian.h', 'dlfcn.h'
endif
endforeach
-foreach f : ['strtof', 'mkostemp', 'posix_memalign', 'timespec_get', 'memfd_create']
+foreach f : ['strtof', 'mkostemp', 'posix_memalign', 'timespec_get', 'memfd_create', 'random_r']
if cc.has_function(f)
pre_args += '-DHAVE_@0@'.format(f.to_upper())
endif
diff --git a/src/glx/glxhash.c b/src/glx/glxhash.c
index b76ec323459..5a89bf99b1c 100644
--- a/src/glx/glxhash.c
+++ b/src/glx/glxhash.c
@@ -88,7 +88,7 @@
#define HASH_ALLOC malloc
#define HASH_FREE free
-#ifndef __GLIBC__
+#ifndef HAVE_RANDOM_R
#define HASH_RANDOM_DECL char *ps, rs[256]
#define HASH_RANDOM_INIT(seed) ps = initstate(seed, rs, sizeof(rs))
#define HASH_RANDOM random()