[packages] triggerhappy: fix determination of input.h, remove explicit override (#8990)
[openwrt.org/packages.git] / utils / triggerhappy / patches / 100-fix-LINUX_INPUT_H.patch
blob:a/utils/triggerhappy/patches/100-fix-LINUX_INPUT_H.patch -> blob:b/utils/triggerhappy/patches/100-fix-LINUX_INPUT_H.patch
--- a/utils/triggerhappy/patches/100-fix-LINUX_INPUT_H.patch
+++ b/utils/triggerhappy/patches/100-fix-LINUX_INPUT_H.patch
@@ -1,1 +1,12 @@
+--- a/Makefile
++++ b/Makefile
+@@ -10,7 +10,7 @@ THCMD_COMPS := th-cmd cmdsocket
+ 
+ MAKEDEPEND = $(CC) -M -MG $(CPPFLAGS) -o $*.d $<
+ 
+-LINUX_INPUT_H := $(shell echo '\#include <linux/input.h>' | $(CC) $(CPPFLAGS) -M -E - | awk 'NR==1 {print $$2}')
++LINUX_INPUT_H := $(shell for i in `echo | $(CC) $(CPPFLAGS) -M -E -include 'linux/input.h' -`; do test -f "$$i" && echo "$$i" && break; done)
+ 
+ all: thd th-cmd man
+ 
 

comments