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