diff options
author | Chris Double <chris.double@double.co.nz> | 2018-11-25 14:30:55 +1300 |
---|---|---|
committer | Chris Double <chris.double@double.co.nz> | 2018-11-25 14:30:55 +1300 |
commit | 7eb75de05fe0b52798a3950a28683fe23736beac (patch) | |
tree | 600c9d188437d7308f05f72c32f8f3a5bf683aac /src/c | |
parent | 096fbda34b67cccd2026c44006bd9bc98d28c98c (diff) |
Replace timelocal usage with mktime
timelocal is a non-standard GNU extension and equivalent
to the POSIX standard mktime. musl-libc doesn't have
timelocal, preventing fully static builds of urweb with
musl.
Diffstat (limited to 'src/c')
-rw-r--r-- | src/c/urweb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/c/urweb.c b/src/c/urweb.c index 2e3e18bc..e203ee37 100644 --- a/src/c/urweb.c +++ b/src/c/urweb.c @@ -4238,7 +4238,7 @@ uw_Basis_time uw_Basis_fromDatetime(uw_context ctx, uw_Basis_int year, uw_Basis_ struct tm tm = { .tm_year = year - 1900, .tm_mon = month, .tm_mday = day, .tm_hour = hour, .tm_min = minute, .tm_sec = second, .tm_isdst = -1 }; - uw_Basis_time r = { timelocal(&tm) }; + uw_Basis_time r = { mktime(&tm) }; return r; } |