diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-09-19 10:14:50 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-09-19 10:15:52 +0200 |
commit | c2673a358c78b864c1276f7956d5a348003b7a02 (patch) | |
tree | 265c3c01dd61cb409662f1f93a252125bb52287c /external/liborcus | |
parent | 5a7dbe1ec161a5683086d22ec13506396dcdddda (diff) |
liborcus: fix Android build
stoi() is missing in the std namespace on the broken Android toolchain,
work it around.
Change-Id: I9ea4f89bea346a4383fbb99e03b09ebae43d21e5
Diffstat (limited to 'external/liborcus')
-rw-r--r-- | external/liborcus/UnpackedTarball_liborcus.mk | 5 | ||||
-rw-r--r-- | external/liborcus/android-workaround.patch | 22 |
2 files changed, 27 insertions, 0 deletions
diff --git a/external/liborcus/UnpackedTarball_liborcus.mk b/external/liborcus/UnpackedTarball_liborcus.mk index 08f3423f2424..09b3c2889f0c 100644 --- a/external/liborcus/UnpackedTarball_liborcus.mk +++ b/external/liborcus/UnpackedTarball_liborcus.mk @@ -23,6 +23,11 @@ $(eval $(call gb_UnpackedTarball_add_patches,liborcus,\ external/liborcus/windows-constants-hack.patch \ )) endif +ifeq ($(OS),ANDROID) +$(eval $(call gb_UnpackedTarball_add_patches,liborcus,\ + external/liborcus/android-workaround.patch \ +)) +endif # vim: set noet sw=4 ts=4: diff --git a/external/liborcus/android-workaround.patch b/external/liborcus/android-workaround.patch new file mode 100644 index 000000000000..f9d047dc0559 --- /dev/null +++ b/external/liborcus/android-workaround.patch @@ -0,0 +1,22 @@ +diff --git a/src/parser/sax_parser_base.cpp b/src/parser/sax_parser_base.cpp +index 743130d..2624bd5 100644 +--- a/src/parser/sax_parser_base.cpp ++++ b/src/parser/sax_parser_base.cpp +@@ -12,6 +12,17 @@ + #include <vector> + #include <memory> + ++#ifdef __ANDROID__ ++namespace std ++{ ++int stoi(const std::string& str, std::size_t* /*pos*/ = 0, int base = 10) ++{ ++ char* end; ++ return strtol(str.c_str(), &end, base); ++} ++} ++#endif ++ + namespace orcus { namespace sax { + + malformed_xml_error::malformed_xml_error(const std::string& msg, std::ptrdiff_t offset) : |