Skip to content

Commit d504e3a

Browse files
committedMar 22, 2023
build: Fixes for Haiku
* Haiku is fully posix, so can be lumped together with most unix cases
1 parent 7b8c63d commit d504e3a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed
 

‎glib_compat/grand.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ GRand *g_rand_new_with_seed_array (const guint32 *seed, guint seed_length)
232232

233233
gint64 g_get_real_time (void)
234234
{
235-
#if defined(unix) || defined(__unix__) || defined(__unix) || defined (__MINGW32__) || defined(__APPLE__)
235+
#if defined(unix) || defined(__unix__) || defined(__unix) || defined (__MINGW32__) || defined(__APPLE__) || defined(__HAIKU__)
236236
struct timeval r;
237237

238238
/* this is required on alpha, there the timeval structs are ints
@@ -271,7 +271,7 @@ gint64 g_get_real_time (void)
271271
GRand *g_rand_new (void)
272272
{
273273
guint32 seed[4];
274-
#if defined(unix) || defined(__unix__) || defined(__unix) || defined(__APPLE__)
274+
#if defined(unix) || defined(__unix__) || defined(__unix) || defined(__APPLE__) || defined(__HAIKU__)
275275
static gboolean dev_urandom_exists = TRUE;
276276

277277
if (dev_urandom_exists)

‎tests/unit/acutest.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@
270270
#include <string.h>
271271
#include <setjmp.h>
272272

273-
#if defined(unix) || defined(__unix__) || defined(__unix) || defined(__APPLE__)
273+
#if defined(unix) || defined(__unix__) || defined(__unix) || defined(__APPLE__) || defined(__HAIKU__)
274274
#define ACUTEST_UNIX_ 1
275275
#include <errno.h>
276276
#include <libgen.h>

0 commit comments

Comments
 (0)
Please sign in to comment.