Skip to content

Commit b1487e4

Browse files
author
The Android Open Source Project
committed
auto import //branches/master/...@140412
1 parent f614d64 commit b1487e4

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

include/cutils/tztime.h

+7
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,18 @@
1717
#ifndef _CUTILS_TZTIME_H
1818
#define _CUTILS_TZTIME_H
1919

20+
#include <time.h>
21+
2022
#ifdef __cplusplus
2123
extern "C" {
2224
#endif
2325

2426
time_t mktime_tz(struct tm * const tmp, char const * tz);
2527
void localtime_tz(const time_t * const timep, struct tm * tmp, const char* tz);
2628

29+
#ifndef HAVE_ANDROID_OS
30+
/* the following is defined in <time.h> in Bionic */
31+
2732
struct strftime_locale {
2833
const char *mon[12]; /* short names */
2934
const char *month[12]; /* long names */
@@ -39,6 +44,8 @@ struct strftime_locale {
3944

4045
size_t strftime_tz(char *s, size_t max, const char *format, const struct tm *tm, const struct strftime_locale *locale);
4146

47+
#endif /* !HAVE_ANDROID_OS */
48+
4249
#ifdef __cplusplus
4350
}
4451
#endif

libcutils/Android.mk

+9-4
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ commonSources := \
3737
properties.c \
3838
threads.c
3939

40+
commonHostSources := \
41+
ashmem-host.c
42+
4043
# some files must not be compiled when building against Mingw
4144
# they correspond to features not used by our host development tools
4245
# which are also hard or even impossible to port to native Win32
@@ -60,16 +63,18 @@ else
6063
selector.c \
6164
fdevent.c \
6265
tztime.c \
63-
tzstrftime.c \
6466
adb_networking.c \
65-
zygote.c
67+
zygote.c
68+
69+
commonHostSources += \
70+
tzstrftime.c
6671
endif
6772

6873

6974
# Static library for host
7075
# ========================================================
7176
LOCAL_MODULE := libcutils
72-
LOCAL_SRC_FILES := $(commonSources) ashmem-host.c
77+
LOCAL_SRC_FILES := $(commonSources) $(commonHostSources)
7378
LOCAL_LDLIBS := -lpthread
7479
LOCAL_STATIC_LIBRARIES := liblog
7580
include $(BUILD_HOST_STATIC_LIBRARY)
@@ -81,7 +86,7 @@ ifeq ($(TARGET_SIMULATOR),true)
8186
# ========================================================
8287
include $(CLEAR_VARS)
8388
LOCAL_MODULE := libcutils
84-
LOCAL_SRC_FILES := $(commonSources) memory.c dlmalloc_stubs.c ashmem-host.c
89+
LOCAL_SRC_FILES := $(commonSources) $(commonHostSources) memory.c dlmalloc_stubs.c
8590
LOCAL_LDLIBS := -lpthread
8691
LOCAL_SHARED_LIBRARIES := liblog
8792
include $(BUILD_SHARED_LIBRARY)

0 commit comments

Comments
 (0)