[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [UNIKRAFT/NEWLIB PATCH] Define tzname



Reviewed-by: Sharan Santhanam <sharan.santhanam@xxxxxxxxx>

On 4/16/20 9:49 PM, Felipe Huici wrote:
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@xxxxxxxxx>
---
  include/time.h | 4 ++++
  1 file changed, 4 insertions(+)

diff --git a/include/time.h b/include/time.h
index a510293..0f94358 100644
--- a/include/time.h
+++ b/include/time.h
@@ -70,4 +70,8 @@ extern long _timezone;
  extern int _daylight;
  extern char *_tzname[2];
+#ifndef tzname
+#define tzname _tzname
+#endif
+
  #endif /* NEWLIBGLUE_TIME_H */




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.