aboutsummaryrefslogtreecommitdiffstats
path: root/main/sdl2/fix-directfb-include.patch
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2017-11-22 15:26:28 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2017-11-22 15:30:31 +0000
commitbf9e945981a04cac944060f2d644d9d8ca216ae1 (patch)
tree06f4914841d5f05610e5d25fe96cd075a35ef25b /main/sdl2/fix-directfb-include.patch
parent31d35d3abc8c8c51b7943fc1a8e75de49a2f0a0d (diff)
downloadaports-bf9e945981a04cac944060f2d644d9d8ca216ae1.tar.bz2
aports-bf9e945981a04cac944060f2d644d9d8ca216ae1.tar.xz
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
Diffstat (limited to 'main/sdl2/fix-directfb-include.patch')
-rw-r--r--main/sdl2/fix-directfb-include.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/main/sdl2/fix-directfb-include.patch b/main/sdl2/fix-directfb-include.patch
new file mode 100644
index 0000000000..0f7cf36016
--- /dev/null
+++ b/main/sdl2/fix-directfb-include.patch
@@ -0,0 +1,27 @@
+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;