diff --git a/CoreFoundation/Base.subproj/CFSortFunctions.c b/CoreFoundation/Base.subproj/CFSortFunctions.c index 517fc309de..172860a6c4 100644 --- a/CoreFoundation/Base.subproj/CFSortFunctions.c +++ b/CoreFoundation/Base.subproj/CFSortFunctions.c @@ -48,8 +48,10 @@ enum { #define __check_int64_div(x, y, err) (x / y) #define __check_uint64_div(x, y, err) (x / y) -#define __checkint_int64_mul(x, y, err) (x * y) -#define __checkint_uint64_add(x, y, err) (x + y) +#define __checkint_int64_mul(x, y, err) __check_int64_mul(x, y, err) +#define __checkint_int32_mul(x, y, err) __check_int32_mul(x, y, err) +#define __checkint_uint64_add(x, y, err) __check_uint64_add(x, y, err) +#define __checkint_uint32_add(x, y, err) __check_uint32_add(x, y, err) #endif diff --git a/CoreFoundation/Base.subproj/CFUtilities.c b/CoreFoundation/Base.subproj/CFUtilities.c index 4e99bc081b..63d4d9e941 100644 --- a/CoreFoundation/Base.subproj/CFUtilities.c +++ b/CoreFoundation/Base.subproj/CFUtilities.c @@ -894,7 +894,6 @@ void CFLog1(CFLogLevel lev, CFStringRef message) { if (maxLength > sizeof(stack_buffer) / sizeof(stack_buffer[0])) { buffer = calloc(sizeof(char), maxLength); if (!buffer) { - - __android_log_print(ANDROID_LOG_ERROR, tag, "Unable to allocate %d bytes for log message - truncating.", (int)axLength); maxLength = sizeof(stack_buffer) / sizeof(stack_buffer[0]); buffer = &stack_buffer[0]; buffer[maxLength-1] = '\000'; diff --git a/CoreFoundation/NumberDate.subproj/CFTimeZone.c b/CoreFoundation/NumberDate.subproj/CFTimeZone.c index dd3701de27..434203ab43 100644 --- a/CoreFoundation/NumberDate.subproj/CFTimeZone.c +++ b/CoreFoundation/NumberDate.subproj/CFTimeZone.c @@ -27,8 +27,10 @@ #if DEPLOYMENT_TARGET_MACOSX || DEPLOYMENT_TARGET_EMBEDDED || DEPLOYMENT_TARGET_LINUX || DEPLOYMENT_TARGET_FREEBSD #include #include +#if !TARGET_OS_ANDROID #include #endif +#endif #if DEPLOYMENT_TARGET_MACOSX || DEPLOYMENT_TARGET_EMBEDDED #include #elif DEPLOYMENT_TARGET_LINUX || DEPLOYMENT_TARGET_FREEBSD diff --git a/CoreFoundation/PlugIn.subproj/CFBundle_InfoPlist.c b/CoreFoundation/PlugIn.subproj/CFBundle_InfoPlist.c index a9ef705ccc..e566377110 100644 --- a/CoreFoundation/PlugIn.subproj/CFBundle_InfoPlist.c +++ b/CoreFoundation/PlugIn.subproj/CFBundle_InfoPlist.c @@ -19,7 +19,9 @@ #if TARGET_OS_CYGWIN #else #include +#if !TARGET_OS_ANDROID #include +#endif #include #endif #endif diff --git a/CoreFoundation/PlugIn.subproj/CFBundle_Resources.c b/CoreFoundation/PlugIn.subproj/CFBundle_Resources.c index b82ec828f4..2586da99de 100644 --- a/CoreFoundation/PlugIn.subproj/CFBundle_Resources.c +++ b/CoreFoundation/PlugIn.subproj/CFBundle_Resources.c @@ -27,7 +27,9 @@ #if DEPLOYMENT_TARGET_MACOSX || DEPLOYMENT_TARGET_EMBEDDED || DEPLOYMENT_TARGET_EMBEDDED_MINI || DEPLOYMENT_TARGET_LINUX #include +#if !TARGET_OS_ANDROID #include +#endif #include #include #endif diff --git a/Foundation/NSHost.swift b/Foundation/NSHost.swift index d01151f99b..3e9944b4e0 100644 --- a/Foundation/NSHost.swift +++ b/Foundation/NSHost.swift @@ -74,7 +74,7 @@ open class Host: NSObject { } var hints = addrinfo() hints.ai_family = PF_UNSPEC -#if os(OSX) || os(iOS) +#if os(OSX) || os(iOS) || os(Android) hints.ai_socktype = SOCK_STREAM #else hints.ai_socktype = Int32(SOCK_STREAM.rawValue) diff --git a/Foundation/NSPlatform.swift b/Foundation/NSPlatform.swift index 427056ca7d..b6c6d8e067 100644 --- a/Foundation/NSPlatform.swift +++ b/Foundation/NSPlatform.swift @@ -15,7 +15,7 @@ import Glibc #if os(OSX) || os(iOS) fileprivate let _NSPageSize = Int(vm_page_size) -#elseif os(Linux) +#elseif os(Linux) || os(Android) fileprivate let _NSPageSize = Int(getpagesize()) #endif