Commit 2fbd3b1e authored by Matthew Waters's avatar Matthew Waters 🐨

recipes/graphene: fix HAVE_INIT_ONCE usage on non-windows

In file included from ../src/graphene-alloc.c:24:0:
../src/graphene-private.h:28:5: error: "HAVE_INIT_ONCE" is not defined [-Werror=undef]
parent 22e286a4
From cdfc9d204c91d00e1c7617a35571e7d10ec65bb5 Mon Sep 17 00:00:00 2001
From b297329d12abcf1347b0bd55a1550c8758cad246 Mon Sep 17 00:00:00 2001
From: Matthew Waters <matthew@centricular.com>
Date: Tue, 16 Oct 2018 19:01:27 +1100
Subject: [PATCH] meson: fix HAVE_INIT_ONCE declaration
......@@ -12,7 +12,7 @@ conf.set10() so an #if defined() will always succeed.
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/graphene-box.c b/src/graphene-box.c
index 489f378..1b1a2c2 100644
index 489f378..a5995d8 100644
--- a/src/graphene-box.c
+++ b/src/graphene-box.c
@@ -677,7 +677,7 @@ init_static_box (void)
......@@ -20,12 +20,12 @@ index 489f378..1b1a2c2 100644
}
-#elif defined(HAVE_INIT_ONCE)
+#elif HAVE_INIT_ONCE
+#elif defined(HAVE_INIT_ONCE) && HAVE_INIT_ONCE
static INIT_ONCE static_box_once = INIT_ONCE_STATIC_INIT;
static BOOL CALLBACK
diff --git a/src/graphene-private.h b/src/graphene-private.h
index e8f9098..935a222 100644
index e8f9098..cdf016b 100644
--- a/src/graphene-private.h
+++ b/src/graphene-private.h
@@ -25,7 +25,7 @@
......@@ -33,12 +33,12 @@ index e8f9098..935a222 100644
#include "config.h"
-#ifdef HAVE_INIT_ONCE
+#if HAVE_INIT_ONCE
+#if defined(HAVE_INIT_ONCE) && HAVE_INIT_ONCE
#define _WIN32_WINNT 0x0600
#include <windows.h>
#endif
diff --git a/src/graphene-vectors.c b/src/graphene-vectors.c
index 7701b3d..5f53e71 100644
index 7701b3d..d81463a 100644
--- a/src/graphene-vectors.c
+++ b/src/graphene-vectors.c
@@ -496,7 +496,7 @@ init_static_vec2 (void)
......@@ -46,7 +46,7 @@ index 7701b3d..5f53e71 100644
}
-#elif defined(HAVE_INIT_ONCE)
+#elif HAVE_INIT_ONCE
+#elif defined(HAVE_INIT_ONCE) && HAVE_INIT_ONCE
static INIT_ONCE static_vec2_once = INIT_ONCE_STATIC_INIT;
static BOOL CALLBACK
......@@ -55,7 +55,7 @@ index 7701b3d..5f53e71 100644
}
-#elif defined(HAVE_INIT_ONCE)
+#elif HAVE_INIT_ONCE
+#elif defined(HAVE_INIT_ONCE) && HAVE_INIT_ONCE
static INIT_ONCE static_vec3_once = INIT_ONCE_STATIC_INIT;
static BOOL CALLBACK
......@@ -64,7 +64,7 @@ index 7701b3d..5f53e71 100644
}
-#elif defined(HAVE_INIT_ONCE)
+#elif HAVE_INIT_ONCE
+#elif defined(HAVE_INIT_ONCE) && HAVE_INIT_ONCE
static INIT_ONCE static_vec4_once = INIT_ONCE_STATIC_INIT;
static BOOL CALLBACK
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment