Skip to content

Commit 591bc5e

Browse files
author
Benjamin Otte
committed
build: Work around duplicated define of APIENTRY
epoxy defines it if windows.h hasn't been included. So include windows.h before epoxy. See also anholt/libepoxy#299
1 parent b5f9d98 commit 591bc5e

File tree

4 files changed

+19
-2
lines changed

4 files changed

+19
-2
lines changed

gdk/gdkmemoryformatprivate.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@
2222
#include "gdkenums.h"
2323
#include "gdktypes.h"
2424

25+
/* epoxy needs this, see https://github.com/anholt/libepoxy/issues/299 */
26+
#ifdef GDK_WINDOWING_WIN32
27+
#include <windows.h>
28+
#endif
29+
2530
#include <epoxy/gl.h>
2631

2732
#ifdef GDK_RENDERING_VULKAN

gdk/win32/gdkglcontext-win32.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
#pragma once
2222

2323
#ifndef DONT_INCLUDE_LIBEPOXY
24+
#ifdef GDK_WINDOWING_WIN32
25+
/* epoxy needs this, see https://github.com/anholt/libepoxy/issues/299 */
26+
#include <windows.h>
27+
#endif
2428
#include <epoxy/gl.h>
2529
#include <epoxy/wgl.h>
2630

gsk/gl/gskgltypesprivate.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,14 @@
2020

2121
#pragma once
2222

23-
#include <epoxy/gl.h>
24-
#include <graphene.h>
2523
#include <gdk/gdk.h>
2624
#include <gsk/gsk.h>
25+
#ifdef GDK_WINDOWING_WIN32
26+
/* epoxy needs this, see https://github.com/anholt/libepoxy/issues/299 */
27+
#include <windows.h>
28+
#endif
29+
#include <epoxy/gl.h>
30+
#include <graphene.h>
2731

2832
G_BEGIN_DECLS
2933

testsuite/gdk/gltexture.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
#include <gtk/gtk.h>
2+
#ifdef GDK_WINDOWING_WIN32
3+
/* epoxy needs this, see https://github.com/anholt/libepoxy/issues/299 */
4+
#include <windows.h>
5+
#endif
26
#include <epoxy/gl.h>
37
#include "gdk/gdktextureprivate.h"
48
#include "gdk/gdkglcontextprivate.h"

0 commit comments

Comments
 (0)