v2: fix FTBS on FreeBSD
(mostly) taken from the FreeBSD port: https://cgit.freebsd.org/ports/tree/x11-drivers/xf86-input-evdev
changes v2:
- always use sys/types.h instead of #ifdef on linux
- drop quirk for ancient linux kernel version
- split into more separate commits
Edited by Enrico Weigelt, metux IT consult .