diff options
Diffstat (limited to 'external')
-rw-r--r-- | external/boost/archive/portable_binary_archive.hpp | 5 | ||||
-rw-r--r-- | external/boost/archive/portable_binary_iarchive.hpp | 15 | ||||
-rw-r--r-- | external/boost/archive/portable_binary_oarchive.hpp | 18 | ||||
-rw-r--r-- | external/db_drivers/liblmdb/CMakeLists.txt | 5 | ||||
-rw-r--r-- | external/unbound/compat/getentropy_linux.c | 6 |
5 files changed, 35 insertions, 14 deletions
diff --git a/external/boost/archive/portable_binary_archive.hpp b/external/boost/archive/portable_binary_archive.hpp index 560ef121b..e940c5b9e 100644 --- a/external/boost/archive/portable_binary_archive.hpp +++ b/external/boost/archive/portable_binary_archive.hpp @@ -14,6 +14,7 @@ #include <boost/config.hpp>
#include <boost/cstdint.hpp>
#include <boost/static_assert.hpp>
+#include <boost/archive/archive_exception.hpp>
#include <climits>
#if CHAR_BIT != 8
@@ -37,7 +38,9 @@ enum portable_binary_archive_flags { //#endif
inline void
-reverse_bytes(char size, char *address){
+reverse_bytes(signed char size, char *address){
+ if (size <= 0)
+ throw archive_exception(archive_exception::other_exception);
char * first = address;
char * last = first + size - 1;
for(;first < last;++first, --last){
diff --git a/external/boost/archive/portable_binary_iarchive.hpp b/external/boost/archive/portable_binary_iarchive.hpp index 7149cca0f..7792b530d 100644 --- a/external/boost/archive/portable_binary_iarchive.hpp +++ b/external/boost/archive/portable_binary_iarchive.hpp @@ -234,7 +234,7 @@ namespace boost { namespace archive { inline void
portable_binary_iarchive::load_impl(boost::intmax_t & l, char maxsize){
- char size;
+ signed char size;
l = 0;
this->primitive_base_t::load(size);
@@ -321,6 +321,8 @@ portable_binary_iarchive::init(unsigned int flags){ boost::archive::library_version_type input_library_version;
* this >> input_library_version;
+ // ignore archive version checking
+ /*
// extra little .t is to get around borland quirk
if(boost::archive::BOOST_ARCHIVE_VERSION() < input_library_version)
boost::serialization::throw_exception(
@@ -328,6 +330,7 @@ portable_binary_iarchive::init(unsigned int flags){ boost::archive::archive_exception::unsupported_version
)
);
+ */
#if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3205))
this->set_library_version(input_library_version);
@@ -354,11 +357,11 @@ namespace detail { template class archive_serializer_map<portable_binary_iarchive>;
}
-template class basic_binary_iprimitive<
- portable_binary_iarchive,
- std::istream::char_type,
- std::istream::traits_type
-> ;
+// template class basic_binary_iprimitive<
+// portable_binary_iarchive,
+// std::istream::char_type,
+// std::istream::traits_type
+//> ;
} // namespace archive
} // namespace boost
diff --git a/external/boost/archive/portable_binary_oarchive.hpp b/external/boost/archive/portable_binary_oarchive.hpp index 8fd7090a1..9ed30d064 100644 --- a/external/boost/archive/portable_binary_oarchive.hpp +++ b/external/boost/archive/portable_binary_oarchive.hpp @@ -225,7 +225,7 @@ portable_binary_oarchive::save_impl( const boost::intmax_t l,
const char maxsize
){
- char size = 0;
+ signed char size = 0;
if(l == 0){
this->primitive_base_t::save(size);
@@ -245,7 +245,7 @@ portable_binary_oarchive::save_impl( }while(ll != 0);
this->primitive_base_t::save(
- static_cast<char>(negative ? -size : size)
+ static_cast<signed char>(negative ? -size : size)
);
if(negative)
@@ -277,10 +277,14 @@ portable_binary_oarchive::init(unsigned int flags) { boost::archive::BOOST_ARCHIVE_SIGNATURE()
);
* this << file_signature;
+ // ignore archive version checking
+ const boost::archive::library_version_type v{};
+ /*
// write library version
const boost::archive::library_version_type v(
boost::archive::BOOST_ARCHIVE_VERSION()
);
+ */
* this << v;
}
save(static_cast<unsigned char>(m_flags >> CHAR_BIT));
@@ -295,11 +299,11 @@ namespace detail { template class archive_serializer_map<portable_binary_oarchive>;
}
-template class basic_binary_oprimitive<
- portable_binary_oarchive,
- std::ostream::char_type,
- std::ostream::traits_type
-> ;
+// template class basic_binary_oprimitive<
+// portable_binary_oarchive,
+// std::ostream::char_type,
+// std::ostream::traits_type
+// > ;
} // namespace archive
} // namespace boost
diff --git a/external/db_drivers/liblmdb/CMakeLists.txt b/external/db_drivers/liblmdb/CMakeLists.txt index 00b203e94..3d55f0eae 100644 --- a/external/db_drivers/liblmdb/CMakeLists.txt +++ b/external/db_drivers/liblmdb/CMakeLists.txt @@ -30,6 +30,11 @@ if(FREEBSD) add_definitions(-DMDB_DSYNC=O_SYNC) endif() +if(ANDROID) + add_definitions("-DANDROID=1") +endif() + + set (lmdb_sources mdb.c midl.c) diff --git a/external/unbound/compat/getentropy_linux.c b/external/unbound/compat/getentropy_linux.c index 37d86a8f1..b8d4a2bd0 100644 --- a/external/unbound/compat/getentropy_linux.c +++ b/external/unbound/compat/getentropy_linux.c @@ -30,7 +30,13 @@ #ifdef HAVE_SYS_SYSCTL_H #include <sys/sysctl.h> #endif +#ifdef __ANDROID__ +#include <sys/vfs.h> +#define statvfs statfs +#define fstatvfs fstatfs +#else #include <sys/statvfs.h> +#endif #include <sys/socket.h> #include <sys/mount.h> #include <sys/mman.h> |