scons: Test for random_r()

Suggested-by: Eric Engestrom <eric.engestrom@intel.com>
diff --git a/scons/gallium.py b/scons/gallium.py
index 2772761..6d5b2fc 100755
--- a/scons/gallium.py
+++ b/scons/gallium.py
@@ -368,6 +368,9 @@
         if check_functions(env, ['strtod_l', 'strtof_l']):
             cppdefines += ['HAVE_STRTOD_L']
 
+        if check_functions(env, 'random_r'):
+            cppdefines += ['HAVE_RANDOM_R']
+
         if check_functions(env, ['timespec_get']):
             cppdefines += ['HAVE_TIMESPEC_GET']