Merge "libcutils: Use proper private header to access C library's <time.h> extension"

This commit is contained in:
David 'Digit' Turner 2012-01-14 04:36:06 -08:00 committed by Android (Google) Code Review
commit ee508560cc
2 changed files with 16 additions and 3 deletions

View File

@ -26,8 +26,14 @@ extern "C" {
time_t mktime_tz(struct tm * const tmp, char const * tz);
void localtime_tz(const time_t * const timep, struct tm * tmp, const char* tz);
#ifndef HAVE_ANDROID_OS
/* the following is defined in <time.h> in Bionic */
#ifdef HAVE_ANDROID_OS
/* the following is defined in the Bionic C library on Android, but the
* declarations are only available through a platform-private header
*/
#include <bionic_time.h>
#else /* !HAVE_ANDROID_OS */
struct strftime_locale {
const char *mon[12]; /* short names */

View File

@ -96,6 +96,12 @@ include $(BUILD_HOST_STATIC_LIBRARY)
# Shared and static library for target
# ========================================================
# This is needed in LOCAL_C_INCLUDES to access the C library's private
# header named <bionic_time.h>
#
libcutils_c_includes := bionic/libc/private
include $(CLEAR_VARS)
LOCAL_MODULE := libcutils
LOCAL_SRC_FILES := $(commonSources) ashmem-dev.c mq.c android_reboot.c partition_utils.c uevent.c qtaguid.c klog.c
@ -115,7 +121,7 @@ endif # !x86-atom
endif # !sh
endif # !arm
LOCAL_C_INCLUDES := $(KERNEL_HEADERS)
LOCAL_C_INCLUDES := $(libcutils_c_includes) $(KERNEL_HEADERS)
LOCAL_STATIC_LIBRARIES := liblog
LOCAL_CFLAGS += $(targetSmpFlag)
include $(BUILD_STATIC_LIBRARY)
@ -125,6 +131,7 @@ LOCAL_MODULE := libcutils
LOCAL_WHOLE_STATIC_LIBRARIES := libcutils
LOCAL_SHARED_LIBRARIES := liblog
LOCAL_CFLAGS += $(targetSmpFlag)
LOCAL_C_INCLUDES := $(libcutils_c_includes)
include $(BUILD_SHARED_LIBRARY)
include $(CLEAR_VARS)