--- xbmc/platform/linux/input/LinuxInputDevices.cpp.orig	2018-03-21 13:02:45 UTC
+++ xbmc/platform/linux/input/LinuxInputDevices.cpp
@@ -31,7 +31,11 @@
 typedef unsigned long kernel_ulong_t;
 #define BITS_PER_LONG    (sizeof(long)*8)
 
+#if defined(TARGET_FREEBSD)
+#include <dev/evdev/input.h>
+#elif defined(TARGET_LINUX)
 #include <linux/input.h>
+#endif
 
 #if defined(HAVE_LIBUDEV)
 #include <libudev.h>
@@ -71,8 +75,10 @@ typedef unsigned long kernel_ulong_t;
 #define XBMC_BUTTON_WHEELDOWN 5
 #endif
 
+#ifdef TARGET_LINUX
 #include <linux/keyboard.h>
 #include <linux/kd.h>
+#endif
 
 #include <string.h>
 #include <unistd.h>
@@ -346,6 +352,7 @@ XBMCKey CLinuxInputDevice::TranslateKey(unsigned short
 
 int CLinuxInputDevice::KeyboardGetSymbol(unsigned short value)
 {
+#ifdef TARGET_LINUX
   unsigned char type = KTYP(value);
   unsigned char index = KVAL(value);
 
@@ -403,12 +410,16 @@ int CLinuxInputDevice::KeyboardGetSymbol(unsigned shor
     break;
 */
   }
-
+#else
   return XBMCK_UNKNOWN;
+#endif
 }
 
 unsigned short CLinuxInputDevice::KeyboardReadValue(unsigned char table, unsigned char index)
 {
+#ifdef TARGET_FREEBSD
+  return 0;
+#else
   struct kbentry entry;
 
   entry.kb_table = table;
@@ -423,6 +434,7 @@ unsigned short CLinuxInputDevice::KeyboardReadValue(un
   }
 
   return entry.kb_value;
+#endif
 }
 
 XBMCMod CLinuxInputDevice::UpdateModifiers(XBMC_Event& devt)
@@ -1365,6 +1377,9 @@ driver_open_device_error:
  */
 bool CLinuxInputDevice::GetKeymapEntry(KeymapEntry& entry)
 {
+#ifdef TARGET_FREEBSD
+  return false;
+#else
   int code = entry.code;
   unsigned short value;
   //DFBInputDeviceKeyIdentifier identifier;
@@ -1415,6 +1430,7 @@ bool CLinuxInputDevice::GetKeymapEntry(KeymapEntry& en
   entry.altShift = value; //KeyboardGetSymbol(code, value, LI_KEYLEVEL_ALT_SHIFT);
 
   return true;
+#endif
 }
 
 /*
--- xbmc/windowing/wayland/InputProcessorPointer.cpp.orig	2018-03-21 13:02:45 UTC
+++ xbmc/windowing/wayland/InputProcessorPointer.cpp
@@ -22,7 +22,11 @@
 
 #include <cmath>
 
+#ifdef TARGET_FREEBSD
+#include <dev/evdev/input-event-codes.h>
+#else
 #include <linux/input-event-codes.h>
+#endif
 
 #include "input/mouse/MouseStat.h"
 
--- xbmc/windowing/wayland/WindowDecorator.cpp.orig	2018-03-21 13:02:45 UTC
+++ xbmc/windowing/wayland/WindowDecorator.cpp
@@ -25,7 +25,11 @@
 #include <cmath>
 #include <vector>
 
+#ifdef TARGET_FREEBSD
+#include <dev/evdev/input-event-codes.h>
+#else
 #include <linux/input-event-codes.h>
+#endif
 
 #include "threads/SingleLock.h"
 #include "Util.h"
