diff options
-rwxr-xr-x | Android.mk | 8 | ||||
-rw-r--r-- | config-compat-darwin.h | 2 |
2 files changed, 10 insertions, 0 deletions
@@ -121,6 +121,10 @@ LOCAL_CFLAGS +=-include $(LOCAL_PATH)/config-compat-linux.h endif ifeq ($(HOST_OS),darwin) LOCAL_CFLAGS +=-include $(LOCAL_PATH)/config-compat-darwin.h +build_mac_version := $(shell sw_vers -productVersion) +ifneq ($(filter 10.7 10.7.%, $(build_mac_version)),) +LOCAL_CFLAGS += -D__APPLE_LION__ +endif endif ifeq ($(HOST_OS),windows) LOCAL_CFLAGS +=-include $(LOCAL_PATH)/config-compat-cygwin.h @@ -183,6 +187,10 @@ LOCAL_CFLAGS +=-include $(LOCAL_PATH)/config-compat-linux.h endif ifeq ($(HOST_OS),darwin) LOCAL_CFLAGS +=-include $(LOCAL_PATH)/config-compat-darwin.h +build_mac_version := $(shell sw_vers -productVersion) +ifneq ($(filter 10.7 10.7.%, $(build_mac_version)),) +LOCAL_CFLAGS += -D__APPLE_LION__ +endif endif ifeq ($(HOST_OS),windows) LOCAL_CFLAGS +=-include $(LOCAL_PATH)/config-compat-cygwin.h diff --git a/config-compat-darwin.h b/config-compat-darwin.h index 7953bb6a..29db51ef 100644 --- a/config-compat-darwin.h +++ b/config-compat-darwin.h @@ -38,6 +38,7 @@ static inline char *dcgettext (char *__domainname, char *__msgid, int __category return NULL; } +#ifndef __APPLE_LION__ static inline size_t strnlen (const char *__string, size_t __maxlen) { int len = 0; @@ -45,6 +46,7 @@ static inline size_t strnlen (const char *__string, size_t __maxlen) len++; return len; } +#endif static inline void *mempcpy (void * __dest, const void * __src, size_t __n) { |