]> xenbits.xensource.com Git - unikraft/libs/newlib.git/commitdiff
Define tzname
authorFelipe Huici <felipe.huici@neclab.eu>
Thu, 16 Apr 2020 19:49:39 +0000 (21:49 +0200)
committerFelipe Huici <felipe.huici@neclab.eu>
Thu, 16 Apr 2020 22:11:36 +0000 (00:11 +0200)
Currently, tzname is defined as an extern, which results in a
undefined reference linker error when attempting to use
it. This patch maps tzname to _tzanme, which *is*
defined. newlib does this mapping in OS-specific files that we
don't compile in, so this is a way to mimic that behavior.

Signed-off-by: Felipe Huici <felipe.huici@neclab.eu>
Reviewed-by: Sharan Santhanam <sharan.santhanam@neclab.eu>
include/time.h

index a510293d5d166a8d88c2ff27d92ca7c8386300b0..0f943583871c90672d7c12fd2cd4045b1ae9a6dc 100644 (file)
@@ -70,4 +70,8 @@ extern long _timezone;
 extern int _daylight;
 extern char *_tzname[2];
 
+#ifndef tzname
+#define tzname _tzname
+#endif
+
 #endif /* NEWLIBGLUE_TIME_H */