Commit 22e286a4 authored by Matthew Waters's avatar Matthew Waters 🐨

recipes/graphene: fix INIT_ONCE errors on windows

../src/graphene-box.c:681:1: error: unknown type name 'INIT_ONCE'
../src/graphene-box.c:681:36: error: 'INIT_ONCE_STATIC_INIT' undeclared here (not in a function)
parent 6258fd77
......@@ -29,6 +29,8 @@ class Recipe(recipe.Recipe):
# Disable NEON completely, it's broken and experimental
meson_options = {'arm_neon' : 'false', 'introspection' : 'false' }
patches = ['graphene/0001-meson-fix-HAVE_INIT_ONCE-declaration.patch']
deps = ['glib']
files_libs = ['libgraphene-1.0']
......
From cdfc9d204c91d00e1c7617a35571e7d10ec65bb5 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
meson will set the HAVE_INIT_ONCE value to 0 or 1 when using
conf.set10() so an #if defined() will always succeed.
---
src/graphene-box.c | 2 +-
src/graphene-private.h | 2 +-
src/graphene-vectors.c | 6 +++---
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/graphene-box.c b/src/graphene-box.c
index 489f378..1b1a2c2 100644
--- a/src/graphene-box.c
+++ b/src/graphene-box.c
@@ -677,7 +677,7 @@ init_static_box (void)
}
}
-#elif defined(HAVE_INIT_ONCE)
+#elif 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
--- a/src/graphene-private.h
+++ b/src/graphene-private.h
@@ -25,7 +25,7 @@
#define __GRAPHENE_PRIVATE_H__
#include "config.h"
-#ifdef HAVE_INIT_ONCE
+#if 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
--- a/src/graphene-vectors.c
+++ b/src/graphene-vectors.c
@@ -496,7 +496,7 @@ init_static_vec2 (void)
}
}
-#elif defined(HAVE_INIT_ONCE)
+#elif HAVE_INIT_ONCE
static INIT_ONCE static_vec2_once = INIT_ONCE_STATIC_INIT;
static BOOL CALLBACK
@@ -1177,7 +1177,7 @@ init_static_vec3 (void)
}
}
-#elif defined(HAVE_INIT_ONCE)
+#elif HAVE_INIT_ONCE
static INIT_ONCE static_vec3_once = INIT_ONCE_STATIC_INIT;
static BOOL CALLBACK
@@ -1876,7 +1876,7 @@ init_static_vec4 (void)
}
}
-#elif defined(HAVE_INIT_ONCE)
+#elif HAVE_INIT_ONCE
static INIT_ONCE static_vec4_once = INIT_ONCE_STATIC_INIT;
static BOOL CALLBACK
--
2.19.0
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