Skip to content

Instantly share code, notes, and snippets.

@benob
Created September 9, 2014 09:36
Show Gist options
  • Save benob/8489f352a307c8daa2ba to your computer and use it in GitHub Desktop.
Save benob/8489f352a307c8daa2ba to your computer and use it in GitHub Desktop.
From 3c148f31fba1b797322b84298eb802e479f2e809 Mon Sep 17 00:00:00 2001
From: Benoit Favre <[email protected]>
Date: Tue, 9 Sep 2014 11:08:56 +0200
Subject: [PATCH] FIX None macro from X11 colliding with Event::None and others
---
src/she/alleg4/she_alleg4.cpp | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/she/alleg4/she_alleg4.cpp b/src/she/alleg4/she_alleg4.cpp
index bf3ed9b..7443aa4 100644
--- a/src/she/alleg4/she_alleg4.cpp
+++ b/src/she/alleg4/she_alleg4.cpp
@@ -37,6 +37,11 @@
#endif
#elif defined(ALLEGRO_UNIX)
#include <xalleg.h>
+ #ifdef None
+ #undef None
+ #define X11_None 0L
+ #endif
+
#endif
#ifdef WIN32
@@ -628,7 +633,7 @@ public:
XGrabPointer(_xwin.display, _xwin.window, False,
PointerMotionMask | ButtonPressMask | ButtonReleaseMask,
GrabModeAsync, GrabModeAsync,
- None, None, CurrentTime);
+ X11_None, X11_None, CurrentTime);
#endif
}
--
2.1.0
@nofxboy1234
Copy link

Thanks so much :D! I was having the same problem on Fedora 20 x86_64. It compiles 100% now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment