From 245e0625309d571b9019b2ea4d0440083c75d99a Mon Sep 17 00:00:00 2001 From: Ron Pedde Date: Wed, 11 Apr 2007 02:33:47 +0000 Subject: [PATCH] Fix for tzset/putenv in compat, to help build on wl500g --- src/compat.c | 8 ++++---- src/win32.h | 4 +++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/compat.c b/src/compat.c index 3f12cbd9..26aab24f 100644 --- a/src/compat.c +++ b/src/compat.c @@ -503,16 +503,16 @@ time_t timegm(struct tm *tm) { char buffer[255]; tz = getenv("TZ"); - _putenv("TZ=UTC0"); - _tzset(); + putenv("TZ=UTC0"); + tzset(); ret = mktime(tm); if(tz) sprintf(buffer,"TZ=%s",tz); else strcpy(buffer,"TZ="); - _putenv(buffer); - _tzset(); + putenv(buffer); + tzset(); return ret; } #endif diff --git a/src/win32.h b/src/win32.h index ce23add0..f9611cb8 100644 --- a/src/win32.h +++ b/src/win32.h @@ -72,7 +72,7 @@ typedef INT64 int64_t; #define mkdir(a,b) _mkdir((a)) #define popen _popen #define pclose _pclose -#define strtoll strtol +#define strtoll strtol #define access _access #define strdup _strdup #define dup _dup @@ -80,6 +80,8 @@ typedef INT64 int64_t; #define lseek _lseek #define dup2 _dup2 #define fileno _fileno +#define tzset _tzset +#define putenv _putenv #define realpath os_realpath #define close os_close