From 7eb75de05fe0b52798a3950a28683fe23736beac Mon Sep 17 00:00:00 2001 From: Chris Double Date: Sun, 25 Nov 2018 14:30:55 +1300 Subject: 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. --- src/c/urweb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/c') 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; } -- cgit v1.2.3