From: Ting-Wei Lan Date: Tue, 1 May 2018 14:28:57 +0000 (+0800) Subject: wayland: Use dev/evdev/input.h on FreeBSD X-Git-Tag: archive/raspbian/4.4.1+ds1-2+rpi1^2~18^2~22^2~342^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=7fed0b74ed9f9c2d2e39a2776719f93cca8f6043;p=gtk4.git wayland: Use dev/evdev/input.h on FreeBSD The header linux/input.h used by GDK is specific to Linux. It is possible to get a few Linux headers on FreeBSD by installing v4l_compat, but it is usually better to use the one shipped with FreeBSD. We prefer dev/evdev/input.h to linux/input.h here, so it will always use dev/evdev/input.h on FreeBSD regardless of v4l_compat. https://svnweb.freebsd.org/changeset/ports/465644 --- diff --git a/config.h.meson b/config.h.meson index 4d4a96e611..74a90d3df8 100644 --- a/config.h.meson +++ b/config.h.meson @@ -286,6 +286,10 @@ /* Define to 1 if linux/memfd.h exists */ #mesondefine HAVE_LINUX_MEMFD_H +#mesondefine HAVE_LINUX_INPUT_H + +#mesondefine HAVE_DEV_EVDEV_INPUT_H + #mesondefine GTK_SYSCONFDIR #mesondefine GTK_LOCALEDIR diff --git a/gdk/wayland/gdkdevice-wayland.c b/gdk/wayland/gdkdevice-wayland.c index 2b28b87aac..c9e710ae1e 100644 --- a/gdk/wayland/gdkdevice-wayland.c +++ b/gdk/wayland/gdkdevice-wayland.c @@ -41,11 +41,13 @@ #include -#include - #include #include +#if defined(HAVE_DEV_EVDEV_INPUT_H) +#include +#elif defined(HAVE_LINUX_INPUT_H) #include +#endif #define BUTTON_BASE (BTN_LEFT - 1) /* Used to translate to 1-indexed buttons */ diff --git a/meson.build b/meson.build index 895cef9fc0..921c6294a5 100644 --- a/meson.build +++ b/meson.build @@ -149,9 +149,11 @@ cdata.set('GTK_INTERFACE_AGE', gtk_interface_age) check_headers = [ 'crt/externs.h', + 'dev/evdev/input.h', 'dlfcn.h', 'ftw.h', 'inttypes.h', + 'linux/input.h', 'linux/memfd.h', 'locale.h', 'memory.h',