mirror of
https://github.com/samba-team/samba.git
synced 2025-01-07 17:18:11 +03:00
Fix build. Don't use BSD setenv. Use POSIX putenv.
Jeremy, it wasn't me!!!!!!
(This used to be commit 00d4e5c67b
)
This commit is contained in:
parent
9dcba81933
commit
b1598ff699
@ -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…
Reference in New Issue
Block a user