fix feature test macros in time.h
[musl] / include / time.h
index 98d0111..50ee500 100644 (file)
@@ -18,7 +18,8 @@ extern "C" {
 #define __NEED_clock_t
 
 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
- || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
+ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
+ || defined(_BSD_SOURCE)
 #define __NEED_struct_timespec
 #define __NEED_clockid_t
 #define __NEED_timer_t
@@ -57,7 +58,8 @@ char *ctime (const time_t *);
 
 
 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
- || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
+ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \
+ || defined(_BSD_SOURCE)
 
 size_t strftime_l (char *, size_t, const char *, const struct tm *, locale_t);
 
@@ -98,7 +100,7 @@ int timer_getoverrun (timer_t);
 #endif
 
 
-#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
+#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
 char *strptime (const char *, const char *, struct tm *);
 extern int daylight;
 extern long timezone;
@@ -108,11 +110,11 @@ struct tm *getdate (const char *);
 #endif
 
 
-#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)
+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
 int stime(time_t *);
+time_t timegm(struct tm *);
 #endif
 
-
 #ifdef __cplusplus
 }
 #endif