aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2016-03-10 19:12:15 +0000
committerJohn Crispin <blogic@openwrt.org>2016-03-10 19:12:15 +0000
commitfce5b6f4823d0e6a886a0ed9668698f18ce52c2d (patch)
tree116f9c9243c1117a28ad8f8b020c753a03e55fb1
parent82c164e26147de4f87ff778c39f97da405c4da4e (diff)
downloadmaster-187ad058-fce5b6f4823d0e6a886a0ed9668698f18ce52c2d.tar.gz
master-187ad058-fce5b6f4823d0e6a886a0ed9668698f18ce52c2d.tar.bz2
master-187ad058-fce5b6f4823d0e6a886a0ed9668698f18ce52c2d.zip
tools/cmake: fix compile on Alpine Linux
internal jsoncpp include order leads to multiple build errors on Alpine Linux which uses musl libc use include order from upstream jsoncpp first error was: In file included from /usr/include/c++/5.3.0/stdexcept:38:0, from /home/..../openwrt/build_dir/host/cmake-3.4.3/Utilities/cmjsoncpp/include/json/assertions.h:16, from /home/..../openwrt/build_dir/host/cmake-3.4.3/Utilities/cmjsoncpp/src/lib_json/json_reader.cpp:7: /usr/include/c++/5.3.0/exception:35:9: error: '#pragma' is not allowed here #pragma GCC visibility push(default) Signed-off-by: Dirk Neukirchen <dirkneukirchen@web.de> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@48995 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--tools/cmake/patches/120-alpine_musl-compat.patch17
1 files changed, 17 insertions, 0 deletions
diff --git a/tools/cmake/patches/120-alpine_musl-compat.patch b/tools/cmake/patches/120-alpine_musl-compat.patch
new file mode 100644
index 0000000000..ae93201e53
--- /dev/null
+++ b/tools/cmake/patches/120-alpine_musl-compat.patch
@@ -0,0 +1,17 @@
+--- a/Utilities/cmjsoncpp/include/json/assertions.h
++++ b/Utilities/cmjsoncpp/include/json/assertions.h
+@@ -6,12 +6,12 @@
+ #ifndef CPPTL_JSON_ASSERTIONS_H_INCLUDED
+ #define CPPTL_JSON_ASSERTIONS_H_INCLUDED
+
++#include <stdlib.h>
++
+ #if !defined(JSON_IS_AMALGAMATION)
+ #include "config.h"
+ #endif // if !defined(JSON_IS_AMALGAMATION)
+
+-#include <stdlib.h>
+-
+ #if JSON_USE_EXCEPTION
+ #include <stdexcept>
+ #define JSON_ASSERT(condition) \