mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-24 19:07:52 +02:00
add support for freebsd (-lc_r for thread foo) and make sure testgthread.c compiles on platforms with rand_r.
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
#include "config.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#define main testglib_main
|
||||
@@ -163,7 +165,11 @@ test_private_func (void *data)
|
||||
wait_thread (1);
|
||||
while (i < TEST_PRIVATE_ROUNDS)
|
||||
{
|
||||
#ifdef HAVE_RAND_R
|
||||
guint random_value = rand_r (&seed) % 10000;
|
||||
#else
|
||||
guint random_value = rand() % 10000;
|
||||
#endif
|
||||
guint *data = g_static_private_get (&private_key);
|
||||
if (!data)
|
||||
{
|
||||
|
Reference in New Issue
Block a user