diff options
author | David 'Digit' Turner <digit@google.com> | 2012-01-13 13:38:40 +0100 |
---|---|---|
committer | David 'Digit' Turner <digit@google.com> | 2012-01-13 13:38:40 +0100 |
commit | 7913bc05bec230799aa70188b40ec7b231f5400f (patch) | |
tree | d5deaf653ad7608f7312172b00e572ffd8e1199d /include | |
parent | dae26c6ac44e9c47cc60fcaa3d04c54d68d66760 (diff) | |
download | core-7913bc05bec230799aa70188b40ec7b231f5400f.tar.gz core-7913bc05bec230799aa70188b40ec7b231f5400f.tar.bz2 core-7913bc05bec230799aa70188b40ec7b231f5400f.zip |
libcutils: Use proper private header to access C library's <time.h> extension
The strftime_tz() function is not a standard C library function and should not
appear in <time.h>. Instead, it is being moved to <bionic_time.h>, a private
header only available to platform libraries.
Change-Id: I4dc18939b9380725dfaa20c9e417296363bc52f4
Diffstat (limited to 'include')
-rw-r--r-- | include/cutils/tztime.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/cutils/tztime.h b/include/cutils/tztime.h index cf103cae5..36ac25d89 100644 --- a/include/cutils/tztime.h +++ b/include/cutils/tztime.h @@ -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 */ |