android: fix various compilation errors

This commit is contained in:
rdb 2018-01-29 19:36:51 +01:00
parent 002b373361
commit e301e5fe5e
3 changed files with 12 additions and 2 deletions

View File

@ -48,6 +48,11 @@
#include <unistd.h>
#endif
#if defined(__ANDROID__) && !defined(HAVE_LOCKF)
// Needed for flock.
#include <sys/file.h>
#endif
TextEncoder::Encoding Filename::_filesystem_encoding = TextEncoder::E_utf8;
TVOLATILE AtomicAdjust::Pointer Filename::_home_directory;

View File

@ -23,6 +23,11 @@
#include <errno.h>
#endif // _WIN32
#if defined(__ANDROID__) && !defined(HAVE_LOCKF)
// Needed for flock.
#include <sys/file.h>
#endif
/**
*
*/

View File

@ -26,7 +26,7 @@
#elif defined(WIN32_VC) || defined(WIN64_VC)
#include <winsock2.h> // For gethostname()
#include <Iphlpapi.h> // For GetAdaptersAddresses()
#elif defined(ANDROID)
#elif defined(__ANDROID__)
#include <net/if.h>
#else
#include <net/if.h>
@ -538,7 +538,7 @@ scan_interfaces() {
PANDA_FREE_ARRAY(addresses);
}
#elif defined(ANDROID)
#elif defined(__ANDROID__)
// TODO: implementation using netlink_socket?
#else // WIN32_VC