ohybridproxy: Properly search for libubox/utils.h
authorFlorian Fainelli <f.fainelli@gmail.com>
Tue, 6 Jun 2017 00:57:40 +0000 (17:57 -0700)
committerFlorian Fainelli <f.fainelli@gmail.com>
Tue, 6 Jun 2017 00:57:40 +0000 (17:57 -0700)
Fixes build error with external toolchains:

/local/users/fainelli/openwrt/trunk/build_dir/target-mipsel-linux-gnu_glibc/ohybridproxy-2016-06-28-8a28ae92c97099e771c9ede5641e3782ae809c27/src/util.h:32:27:
fatal error: libubox/utils.h: No such file or directory
 #include <libubox/utils.h>
                           ^
compilation terminated.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
ohybridproxy/patches/0001-find-libubox.patch [new file with mode: 0644]

diff --git a/ohybridproxy/patches/0001-find-libubox.patch b/ohybridproxy/patches/0001-find-libubox.patch
new file mode 100644 (file)
index 0000000..e29db5c
--- /dev/null
@@ -0,0 +1,26 @@
+From c015e7e62ed4c7645595f7f83cf156810433d0cd Mon Sep 17 00:00:00 2001
+From: Florian Fainelli <f.fainelli@gmail.com>
+Date: Mon, 5 Jun 2017 17:56:33 -0700
+Subject: [PATCH] Cmake: Search and find libubox/utils.h
+
+---
+ CMakeLists.txt | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 2556669d2a52..1c970d92ff56 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -16,6 +16,9 @@ else(${APPLE})
+ set(dns_sd "dns_sd")
+ endif(${APPLE})
++FIND_PATH(ubox_include_dir libubox/utils.h)
++INCLUDE_DIRECTORIES(${ubox_include_dir})
++
+ set(CORE src/cache.c src/io.c src/socket.c)
+ add_executable(ohybridproxy src/ohybridproxy.c src/dns2mdns.c ${CORE})
+-- 
+2.9.3
+