#include <stdlib.h>
#include <stddef.h>
#include <string.h>
+#include <strings.h>
#include <time.h>
#include <sys/time.h>
#include <limits.h>
_time_t2tm(x, days, result);
result->tm_isdst = dst;
#ifdef __UCLIBC_HAS_TM_EXTENSIONS__
+# ifdef __USE_BSD
result->tm_gmtoff = - tzi[dst].gmt_offset;
result->tm_zone = lookup_tzname(tzi[dst].tzname);
+# else
+ result->__tm_gmtoff = - tzi[dst].gmt_offset;
+ result->__tm_zone = lookup_tzname(tzi[dst].tzname);
+# endif
#endif /* __UCLIBC_HAS_TM_EXTENSIONS__ */
} while ((++dst < 2)
&& ((result->tm_isdst = tm_isdst(result, tzi)) != 0));
#ifdef __UCLIBC_HAS_TM_EXTENSIONS__
#define RSP_TZUNLOCK ((void) 0)
-#define RSP_TZNAME timeptr->tm_zone
-#define RSP_GMT_OFFSET (-timeptr->tm_gmtoff)
+# ifdef __USE_BSD
+# define RSP_TZNAME timeptr->tm_zone
+# define RSP_GMT_OFFSET (-timeptr->tm_gmtoff)
+# else
+# define RSP_TZNAME timeptr->__tm_zone
+# define RSP_GMT_OFFSET (-timeptr->__tm_gmtoff)
+# endif
#else
/* TODO -- should this be 0? */
p[4] = 0; /* result[8] .. tm_isdst */
#ifdef __UCLIBC_HAS_TM_EXTENSIONS__
+# ifdef __USE_BSD
result->tm_gmtoff = 0;
result->tm_zone = utc_string;
+# else
+ result->__tm_gmtoff = 0;
+ result->__tm_zone = utc_string;
+# endif
#endif /* __UCLIBC_HAS_TM_EXTENSIONS__ */
return result;
#include <sys/time.h>
libc_hidden_proto(gettimeofday)
-
+#ifdef __USE_BSD
_syscall2(int, gettimeofday, struct timeval *, tv, struct timezone *, tz);
+#else
+_syscall2(int, gettimeofday, struct timeval *, tv, void *, tz);
+#endif
libc_hidden_def(gettimeofday)