aports/main/sdl2/fix-directfb-include.patch
Natanael Copa bf9e945981 main/sdl2: fix include of directfb in header
we need to include the directfb.h outside extern "C" because it includes
c++ headers, or we will have an error: template with C linkage when
compiling gource.

similar to this issue here:
https://github.com/msgpack/msgpack-c/issues/551
2017-11-22 15:30:31 +00:00

28 lines
614 B
Diff

diff --git a/include/SDL_syswm.h b/include/SDL_syswm.h
index 2d18afb..6416e2f 100644
--- a/include/SDL_syswm.h
+++ b/include/SDL_syswm.h
@@ -34,6 +34,11 @@
#include "SDL_version.h"
#include "begin_code.h"
+
+#if defined(SDL_VIDEO_DRIVER_DIRECTFB)
+#include <directfb.h>
+#endif
+
/* Set up for C function definitions, even when using C++ */
#ifdef __cplusplus
extern "C" {
@@ -79,10 +84,6 @@ struct SDL_SysWMinfo;
#endif /* defined(SDL_VIDEO_DRIVER_X11) */
-#if defined(SDL_VIDEO_DRIVER_DIRECTFB)
-#include <directfb.h>
-#endif
-
#if defined(SDL_VIDEO_DRIVER_COCOA)
#ifdef __OBJC__
@class NSWindow;