mirror of
https://github.com/samba-team/samba.git
synced 2025-01-22 22:04:08 +03:00
Fix build. Don't use BSD setenv. Use POSIX putenv.
Jeremy, it wasn't me!!!!!!
This commit is contained in:
parent
86eb0a25b1
commit
00d4e5c67b
@ -438,15 +438,18 @@ char *rep_inet_ntoa(struct in_addr ip)
|
||||
{
|
||||
time_t ret;
|
||||
char *tz;
|
||||
char *tzvar;
|
||||
|
||||
tz = getenv("TZ");
|
||||
setenv("TZ", "", 1);
|
||||
putenv("TZ=");
|
||||
tzset();
|
||||
ret = mktime(tm);
|
||||
if (tz) {
|
||||
setenv("TZ", tz, 1);
|
||||
asprintf(&tzvar, "TZ=%s", tz);
|
||||
putenv(tzvar);
|
||||
safe_free(tzvar);
|
||||
} else {
|
||||
unsetenv("TZ");
|
||||
putenv("TZ");
|
||||
}
|
||||
tzset();
|
||||
return ret;
|
||||
|
Loading…
x
Reference in New Issue
Block a user