Author: Jaret Cantu <jaret.cantu@timesys.com>
Date:   Thu Nov 20 13:10:47 EST 2014

    Check for the existence of EVIOCGPROP()

    The EV_VERSION in 2.6.37 falls within the check, but EVIOCGPROP was not
    introduced until 2.6.38.

Index: gcc-8.2.0/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
===================================================================
--- gcc-8.2.0.orig/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
+++ gcc-8.2.0/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
@@ -848,7 +848,11 @@ unsigned struct_ElfW_Phdr_sz = sizeof(El
   unsigned IOCTL_EQL_SETSLAVECFG = EQL_SETSLAVECFG;
 #if EV_VERSION > (0x010000)
   unsigned IOCTL_EVIOCGKEYCODE_V2 = EVIOCGKEYCODE_V2;
+#ifdef EVIOCGPROP
   unsigned IOCTL_EVIOCGPROP = EVIOCGPROP(0);
+#else
+  unsigned IOCTL_EVIOCGPROP = IOCTL_NOT_PRESENT;
+#endif
   unsigned IOCTL_EVIOCSKEYCODE_V2 = EVIOCSKEYCODE_V2;
 #else
   unsigned IOCTL_EVIOCGKEYCODE_V2 = IOCTL_NOT_PRESENT;
