xref: /OK3568_Linux_fs/buildroot/package/zip/0007-timezone.c-needs-time.h-fixes-musl-compile.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1From 68abba9fb2ed114ac35712756b1f7700a865c498 Mon Sep 17 00:00:00 2001
2From: Peter Seiderer <ps.report@gmx.net>
3Date: Tue, 17 Dec 2019 21:25:01 +0100
4Subject: [PATCH] timezone.c: needs time.h (fixes musl compile)
5
6Fixes:
7
8  In file included from util.c:28:
9  timezone.c: In function 'mktime':
10  timezone.c:644:18: error: dereferencing pointer to incomplete type 'struct tm'
11       save_isdst = tm->tm_isdst;
12
13  timezone.c:661:11: warning: implicit declaration of function 'localtime'; did you mean 'dostime'? [-Wimplicit-function-declaration]
14       ltm = localtime(&then);
15
16  timezone.c:661:9: warning: assignment to 'struct tm *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
17       ltm = localtime(&then);
18
19Signed-off-by: Peter Seiderer <ps.report@gmx.net>
20---
21 timezone.c | 1 +
22 1 file changed, 1 insertion(+)
23
24diff --git a/timezone.c b/timezone.c
25index 485ec02..18aecbd 100644
26--- a/timezone.c
27+++ b/timezone.c
28@@ -41,6 +41,7 @@
29 #include "timezone.h"
30 #include <ctype.h>
31 #include <errno.h>
32+#include <time.h>
33
34 #ifdef IZTZ_DEFINESTDGLOBALS
35 long timezone = 0;
36--
372.24.0
38
39