From: VMware, Inc <> Date: Mon, 20 Dec 2010 22:17:15 +0000 (-0800) Subject: Fix conflicting Bool types when using X11. X-Git-Tag: 2010.12.19-339835~14 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4df41acaa2db6d587539647dc0795c092de6d7f4;p=thirdparty%2Fopen-vm-tools.git Fix conflicting Bool types when using X11. 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 --- diff --git a/open-vm-tools/lib/include/vm_basic_types.h b/open-vm-tools/lib/include/vm_basic_types.h index 15751280d..fa538c264 100644 --- a/open-vm-tools/lib/include/vm_basic_types.h +++ b/open-vm-tools/lib/include/vm_basic_types.h @@ -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