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
/* 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
#include <xkbcommon/xkbcommon.h>
-#include <linux/input.h>
-
#include <sys/time.h>
#include <sys/mman.h>
+#if defined(HAVE_DEV_EVDEV_INPUT_H)
+#include <dev/evdev/input.h>
+#elif defined(HAVE_LINUX_INPUT_H)
#include <linux/input.h>
+#endif
#define BUTTON_BASE (BTN_LEFT - 1) /* Used to translate to 1-indexed buttons */
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',