0007-timezone.c-needs-time.h-fixes-musl-compile.patch 1.1 KB

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