mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-20 15:48:54 +02:00
Merge branch 'wip/pwithnall/scanner-test-fixes-macos' into 'main'
tests: Add missing unistd.h include to scannerapi.c See merge request GNOME/glib!4579
This commit is contained in:
@@ -138,9 +138,10 @@ thread_func (gpointer user_data)
|
|||||||
GRand *rand;
|
GRand *rand;
|
||||||
|
|
||||||
rand = g_rand_new ();
|
rand = g_rand_new ();
|
||||||
|
g_assert (data->n_locks <= G_MAXINT32);
|
||||||
|
|
||||||
for (unsigned int i = 0; i < data->n_iterations; i++)
|
for (unsigned int i = 0; i < data->n_iterations; i++)
|
||||||
acquire (data, g_rand_int_range (rand, 0, data->n_locks));
|
acquire (data, g_rand_int_range (rand, 0, (gint32) data->n_locks));
|
||||||
|
|
||||||
g_rand_free (rand);
|
g_rand_free (rand);
|
||||||
|
|
||||||
|
@@ -26,6 +26,8 @@
|
|||||||
|
|
||||||
#ifdef G_OS_WIN32
|
#ifdef G_OS_WIN32
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
|
#else
|
||||||
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* GScanner fixture */
|
/* GScanner fixture */
|
||||||
|
Reference in New Issue
Block a user