mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-24 22:25:56 -05:00
Fix for tzset/putenv in compat, to help build on wl500g
This commit is contained in:
parent
914cd2d54d
commit
245e062530
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user