mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-25 06:35:57 -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
|
||||
|
@ -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