Fix for tzset/putenv in compat, to help build on wl500g

This commit is contained in:
Ron Pedde 2007-04-11 02:33:47 +00:00
parent 914cd2d54d
commit 245e062530
2 changed files with 7 additions and 5 deletions

View File

@ -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

View File

@ -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