diff --git a/configure.ac b/configure.ac index 5d2ad57..a479de1 100644 --- a/configure.ac +++ b/configure.ac @@ -48,7 +48,7 @@ XORG_WITH_LINT AC_CHECK_FUNCS([asprintf timingsafe_memcmp]) # Obtain compiler/linker options from server and required extensions -PKG_CHECK_MODULES(XORG, [xorg-server >= 1.10] xproto inputproto) +PKG_CHECK_MODULES(XORG, [xorg-server >= 1.10 xproto >= 7.0.27 inputproto]) # Define a configure option for an alternate input module directory AC_ARG_WITH(xorg-module-dir, diff --git a/src/mouse.c b/src/mouse.c index 0d117c8..3d3fcc5 100644 --- a/src/mouse.c +++ b/src/mouse.c @@ -1214,7 +1214,7 @@ MouseReadInput(InputInfoPtr pInfo) case PROT_GLIDE: case PROT_THINKING: buttons |= ((int)(u & 0x10) >> 1); - /* fall through */ + _X_FALLTHROUGH; /* fall through */ default: buttons |= ((int)(u & 0x20) >> 4) | @@ -3641,7 +3641,7 @@ autoGood(MouseDevPtr pMse) case AUTOPROBE_H_VALIDATE2: if (mPriv->goodCount < PROBE_UNCERTAINTY/2) return TRUE; - /* FALLTHROUGH */ + _X_FALLTHROUGH; /* FALLTHROUGH */ default: return FALSE; } diff --git a/src/mouse.h b/src/mouse.h index e0cff9e..4cbf056 100644 --- a/src/mouse.h +++ b/src/mouse.h @@ -30,6 +30,16 @@ #ifndef _XF86OSMOUSE_H_ #define _XF86OSMOUSE_H_ +#include + +#ifndef _X_FALLTHROUGH /* xproto < 7.0.34 */ +# if __has_attribute(fallthrough) +# define _X_FALLTHROUGH __attribute__((fallthrough)) +# else +# define _X_FALLTHROUGH (void)0 +# endif +#endif + #include "xf86Xinput.h" #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 18 diff --git a/src/sun_mouse.c b/src/sun_mouse.c index 614b6d5..9efeb2c 100644 --- a/src/sun_mouse.c +++ b/src/sun_mouse.c @@ -752,7 +752,7 @@ vuidMouseProc(DeviceIntPtr pPointer, int what) if (m != NULL) m->next = pVuidMse->next; } - /* fallthrough */ + _X_FALLTHROUGH; /* fallthrough */ case DEVICE_OFF: if (pInfo->fd != -1) { if (pVuidMse->strmod) {