jsonfilter: allow empty paths
[openwrt/staging/yousong.git] / package / utils / spidev_test / Makefile
index 807039a1f5958cfdb25511c6a0e6e15f04111b63..631ef0dd2407628ceb479c94961a1a50d8856019 100644 (file)
@@ -30,9 +30,18 @@ endef
 define Build/Prepare
 endef
 
+# requires 214-spidev_h_portability.patch
+# or linux/ioctl.h include on musl
 define Build/Compile
+
+ifneq ($(CONFIG_LINUX_3_18)$(CONFIG_LINUX_4_1)$(CONFIG_LINUX_4_4),y)
+       $(TARGET_CC) $(TARGET_CFLAGS) -o $(PKG_BUILD_DIR)/spidev_test \
+               $(LINUX_DIR)/tools/spi/spidev_test.c
+else
        $(TARGET_CC) $(TARGET_CFLAGS) -o $(PKG_BUILD_DIR)/spidev_test \
                $(LINUX_DIR)/Documentation/spi/spidev_test.c
+endif
+
 endef
 
 define Package/spidev-test/install