tools/mkimage: avoid picking up unrelated /usr/include headers with the same name...
[openwrt/openwrt.git] / tools / mkimage / patches / 040-include_order.patch
diff --git a/tools/mkimage/patches/040-include_order.patch b/tools/mkimage/patches/040-include_order.patch
new file mode 100644 (file)
index 0000000..5a9d15e
--- /dev/null
@@ -0,0 +1,14 @@
+--- a/tools/Makefile
++++ b/tools/Makefile
+@@ -159,9 +159,9 @@ NOPEDOBJS := $(addprefix $(obj),$(NOPED_
+ # Use native tools and options
+ # Define __KERNEL_STRICT_NAMES to prevent typedef overlaps
+ #
+-HOSTCPPFLAGS =        -idirafter $(SRCTREE)/include \
++HOSTCPPFLAGS =        -I $(SRCTREE)/include \
+               -idirafter $(OBJTREE)/include2 \
+-              -idirafter $(OBJTREE)/include \
++              -I $(OBJTREE)/include \
+               -I $(SRCTREE)/lib/libfdt \
+               -I $(SRCTREE)/tools \
+               -DCONFIG_SYS_TEXT_BASE=$(CONFIG_SYS_TEXT_BASE) \