mirror of git://git.musl-libc.org/musl
add timegm function (inverse of gmtime), nonstandard
This commit is contained in:
parent
2169265ec6
commit
23be72ae45
|
@ -114,6 +114,9 @@ struct tm *getdate (const char *);
|
||||||
int stime(time_t *);
|
int stime(time_t *);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(_GNU_SOURCE)
|
||||||
|
time_t timegm(struct tm *);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
#define _GNU_SOURCE
|
||||||
|
#include <time.h>
|
||||||
|
|
||||||
|
#include "__time.h"
|
||||||
|
|
||||||
|
time_t timegm(struct tm *tm)
|
||||||
|
{
|
||||||
|
return __tm_to_time(tm);
|
||||||
|
}
|
Loading…
Reference in New Issue