Revert "Remove ftime from bionic LP64"

Breaking some build... will look in to it later.

This reverts commit 26d6799bbe.

Change-Id: I35fa770221be3a181bd37c6c3dce1bf37a69a4a1
This commit is contained in:
Dan Albert
2014-06-05 00:50:43 +00:00
parent 26d6799bbe
commit 0921204660
4 changed files with 97 additions and 31 deletions

View File

@@ -226,35 +226,4 @@ extern "C" wchar_t* wcswcs(wchar_t* haystack, wchar_t* needle) {
return wcsstr(haystack, needle);
}
// Only used by ftime, which was removed from POSIX.
struct timeb {
time_t time;
unsigned short millitm;
short timezone;
short dstflag;
};
// This was removed from POSIX.
extern "C" int ftime(struct timeb* tb)
{
struct timeval tv;
struct timezone tz;
if (gettimeofday(&tv, &tz) < 0)
return -1;
tb->time = tv.tv_sec;
tb->millitm = (tv.tv_usec + 500) / 1000;
if (tb->millitm == 1000) {
++tb->time;
tb->millitm = 0;
}
tb->timezone = tz.tz_minuteswest;
tb->dstflag = tz.tz_dsttime;
return 0;
}
#endif