From fa02334233a801046afa1f4655380335b3823d68 Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Mon, 22 Aug 2022 21:42:30 -0400 Subject: tools: Fix declaration of xf86EnableIO() /usr/include/xorg/xf86_OSproc.h:115:23: error: type of 'xf86EnableIO' does not match original declaration [-Werror=lto-type-mismatch] 115 | extern _X_EXPORT Bool xf86EnableIO(void); | ^ vmmouse_iopl.c:125:6: note: return value type mismatch 125 | bool xf86EnableIO(void) | ^ --- tools/vmmouse_iopl.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/tools/vmmouse_iopl.c b/tools/vmmouse_iopl.c index 27bbe62..af13251 100644 --- a/tools/vmmouse_iopl.c +++ b/tools/vmmouse_iopl.c @@ -40,6 +40,7 @@ #include #endif +#include #include #if defined(VMMOUSE_OS_BSD) @@ -56,13 +57,13 @@ /***************************************************************************/ /* I/O Permissions section */ /***************************************************************************/ -static bool ExtendedEnabled = false; +static Bool ExtendedEnabled = false; -bool +Bool xf86EnableIO() { if (ExtendedEnabled) - return true; + return false; if (IOPL_NAME(1) < 0) return false; @@ -91,7 +92,7 @@ xf86DisableIO() #include static int IoFd = -1; -bool +Bool xf86EnableIO() { if (IoFd >= 0) @@ -117,12 +118,12 @@ xf86DisableIO() #elif defined(VMMOUSE_OS_GENERIC) -static bool ExtendedEnabled = false; +static Bool ExtendedEnabled = false; extern int ioperm(unsigned long __from, unsigned long __num, int __turn_on); extern int iopl(int __level); -bool xf86EnableIO(void) +Bool xf86EnableIO(void) { if (ExtendedEnabled) return true; @@ -181,9 +182,9 @@ xf86DisableIO(void) #include #endif -static bool ExtendedEnabled = false; +static Bool ExtendedEnabled = false; -bool +Bool xf86EnableIO(void) { if (ExtendedEnabled) -- cgit v1.2.3