1
0
Fork 0
mirror of https://repo.or.cz/socat.git synced 2025-07-28 21:32:56 +00:00

environ variable from C runtime is not declared on all systems

This commit is contained in:
Gerhard Rieger 2015-01-18 17:43:13 +01:00
parent f749f5c3e4
commit f0abfc19fd
4 changed files with 36 additions and 0 deletions

View file

@ -1155,6 +1155,7 @@ static int openssl_delete_cert_info(void) {
for (i = 0; i < l; ++i) envprefix[i] = toupper(envprefix[i]);
strncat(envprefix+l, "_OPENSSL_", XIO_ENVNAMELEN-l-1);
#if HAVE_VAR_ENVIRON
entry = (const char **)environ;
while (*entry != NULL) {
if (!strncmp(*entry, envprefix, strlen(envprefix))) {
@ -1166,6 +1167,7 @@ static int openssl_delete_cert_info(void) {
++entry;
}
}
#endif /* HAVE_VAR_ENVIRON */
return 0;
}