From d504e3a004a594bc96e163ba691ad8ed1e9d389b Mon Sep 17 00:00:00 2001 From: Alexander von Gluck IV Date: Wed, 22 Mar 2023 13:57:12 -0500 Subject: [PATCH] build: Fixes for Haiku * Haiku is fully posix, so can be lumped together with most unix cases --- glib_compat/grand.c | 4 ++-- tests/unit/acutest.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/glib_compat/grand.c b/glib_compat/grand.c index b6e57645..0d3f95b4 100644 --- a/glib_compat/grand.c +++ b/glib_compat/grand.c @@ -232,7 +232,7 @@ GRand *g_rand_new_with_seed_array (const guint32 *seed, guint seed_length) gint64 g_get_real_time (void) { -#if defined(unix) || defined(__unix__) || defined(__unix) || defined (__MINGW32__) || defined(__APPLE__) +#if defined(unix) || defined(__unix__) || defined(__unix) || defined (__MINGW32__) || defined(__APPLE__) || defined(__HAIKU__) struct timeval r; /* this is required on alpha, there the timeval structs are ints @@ -271,7 +271,7 @@ gint64 g_get_real_time (void) GRand *g_rand_new (void) { guint32 seed[4]; -#if defined(unix) || defined(__unix__) || defined(__unix) || defined(__APPLE__) +#if defined(unix) || defined(__unix__) || defined(__unix) || defined(__APPLE__) || defined(__HAIKU__) static gboolean dev_urandom_exists = TRUE; if (dev_urandom_exists) diff --git a/tests/unit/acutest.h b/tests/unit/acutest.h index 6b4d596d..fbe55bc2 100644 --- a/tests/unit/acutest.h +++ b/tests/unit/acutest.h @@ -270,7 +270,7 @@ #include #include -#if defined(unix) || defined(__unix__) || defined(__unix) || defined(__APPLE__) +#if defined(unix) || defined(__unix__) || defined(__unix) || defined(__APPLE__) || defined(__HAIKU__) #define ACUTEST_UNIX_ 1 #include #include