]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Fix conflicting Bool types when using X11.
authorVMware, Inc <>
Mon, 20 Dec 2010 22:17:15 +0000 (14:17 -0800)
committerMarcelo Vanzin <mvanzin@vmware.com>
Mon, 20 Dec 2010 22:17:15 +0000 (14:17 -0800)
Some distributions'* X headers seem to cause conflicts that our current
checks weren't catching. It sucks that we have this conflicting type
name and that they are of different types in the first place, but what
are you gonna do...

Anyway, checking upstream's version of Xdefs.h, it seems to check for
_XTYPEDEF_BOOL when defining the type. So both check for that before
defining our type, and define it so that Xdefs.h won't try to re-define
it.

* See:
http://sourceforge.net/tracker/?func=detail&atid=989708&aid=3118268&group_id=204462

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
open-vm-tools/lib/include/vm_basic_types.h

index 15751280d5e116b9778a0dba2f5d806879069016..fa538c264f33aeaffc2830a91afa547c0ec78745 100644 (file)
@@ -82,7 +82,9 @@
 #include "includeCheck.h"
 
 /* STRICT ANSI means the Xserver build and X defines Bool differently. */
-#if !defined(__STRICT_ANSI__) || defined(__FreeBSD__) || defined(__MINGW32__)
+#if !defined(_XTYPEDEF_BOOL) && \
+    (!defined(__STRICT_ANSI__) || defined(__FreeBSD__) || defined(__MINGW32__))
+#define _XTYPEDEF_BOOL
 typedef char           Bool;
 #endif