[Nickle] nickle: Branch 'master'

Keith Packard keithp at keithp.com
Wed Nov 15 14:17:18 PST 2017


 builtin-date.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit cddef3731f36c2d86ebb8fa7e9bdd6a719275431
Author: Keith Packard <keithp at keithp.com>
Date:   Wed Nov 15 14:15:03 2017 -0800

    Use mktime instead of timelocal
    
    timelocal is a glibc alias for mktime and isn't provided by the musl C
    library.
    
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/builtin-date.c b/builtin-date.c
index cc8cdd5..1c24441 100644
--- a/builtin-date.c
+++ b/builtin-date.c
@@ -143,7 +143,7 @@ do_Date_timelocal(Value v)
     time_t	seconds;
 
     from_date(v, &tm);
-    seconds = timelocal(&tm);
+    seconds = mktime(&tm);
     RETURN(Reduce(NewSignedDigitInteger((signed_digit) seconds)));
 }
 


More information about the Nickle mailing list