Build fixes for Android. Cross-compiling for any platform currently requires configuring with the --disable-openssl option, due to use of an AC_TRY_RUN macro for OpenSSL detection. Depending on the targeted Android version, it may be necessary to supply 'CFLAGS=-fPIE' and 'LDFLAGS=-fPIE -pie' to create runnable binaries.

This commit is contained in:
Brian Cox 2016-03-29 00:04:40 -07:00
parent 2038ff627d
commit 5490bd3a2f
2 changed files with 7 additions and 2 deletions

View File

@ -62,8 +62,8 @@
#include "twcrypto/crypto.h"
#include "core/displayencoder.h"
//Syllable OS doesn't provide swab(), so we'll borrow one from glibc.
#ifdef __SYLLABLE__
//Provide a swab() impl. from glibc, for platforms that don't have one
#if defined(__SYLLABLE__) || defined(__ANDROID_API__)
void swab (const void *bfrom, void *bto, ssize_t n)
{
const char *from = (const char *) bfrom;

View File

@ -216,8 +216,12 @@ std::string convert_to_encoded_hex( char ch )
return sstr.str();
}
std::string util_ConvertMB( const std::string& sIn )
{
#if defined(__ANDROID_API__) || defined(__AROS__)
return sIn;
#else
cDebug d( "cPolicyParser::util_ConvertMB" );
std::string sOut;
@ -265,5 +269,6 @@ std::string util_ConvertMB( const std::string& sIn )
}
return sOut;
#endif
}