mirror of
https://repo.or.cz/socat.git
synced 2025-07-08 21:36:34 +00:00
HP-UX port: unsetenv() might not exist
This commit is contained in:
parent
a0435920f6
commit
618170baf3
4 changed files with 13 additions and 1 deletions
|
@ -550,7 +550,9 @@ int xiosetenv(const char *varname, const char *value, int overwrite) {
|
|||
if (Setenv(envname, value, overwrite) < 0) {
|
||||
Warn3("setenv(\"%s\", \"%s\", 1): %s",
|
||||
envname, value, strerror(errno));
|
||||
#if HAVE_UNSETENV
|
||||
Unsetenv(envname); /* dont want to have a wrong value */
|
||||
#endif
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
|
@ -579,7 +581,9 @@ int xiosetenv2(const char *varname, const char *varname2, const char *value,
|
|||
if (Setenv(envname, value, overwrite) < 0) {
|
||||
Warn3("setenv(\"%s\", \"%s\", 1): %s",
|
||||
envname, value, strerror(errno));
|
||||
#if HAVE_UNSETENV
|
||||
Unsetenv(envname); /* dont want to have a wrong value */
|
||||
#endif
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue