diff --git a/src/misc/misc_time.c b/src/misc/misc_time.c index 7a294a838..5c52b6619 100644 --- a/src/misc/misc_time.c +++ b/src/misc/misc_time.c @@ -9,9 +9,20 @@ Copyright 1990 Regents of the University of California. All rights reserved. #include "ngspice/ngspice.h" #include +#if defined(HAS_WINGUI) || defined(__MINGW32__) || defined(_MSC_VER) #ifdef HAVE_QUERYPERFORMANCECOUNTER +#define WIN32_LEAN_AND_MEAN + /* + * The ngspice.h file included above defines BOOLEAN (via bool.h) and this + * clashes with the definition obtained from windows.h (via winnt.h). + * However, BOOLEAN is not used by this file so we can work round this problem + * by undefining BOOLEAN before including windows.h + * SJB - April 2005 + */ +#undef BOOLEAN #include #endif +#endif #include "misc_time.h"