mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 15:48:49 -05:00
vtls: replaced getenv() with curl_getenv()
Fixed undefined symbol of getenv() which does not exist when compiling for Windows 10 App (CURL_WINDOWS_APP). Replaced getenv() with curl_getenv() which is aware of getenv() absence when CURL_WINDOWS_APP is defined. Closes #2171
This commit is contained in:
parent
ef5633d4b3
commit
2437dbbf12
@ -1260,6 +1260,7 @@ static size_t Curl_multissl_version(char *buffer, size_t size)
|
||||
static int multissl_init(const struct Curl_ssl *backend)
|
||||
{
|
||||
const char *env;
|
||||
char *env_tmp;
|
||||
int i;
|
||||
|
||||
if(Curl_ssl != &Curl_ssl_multi)
|
||||
@ -1273,7 +1274,7 @@ static int multissl_init(const struct Curl_ssl *backend)
|
||||
if(!available_backends[0])
|
||||
return 1;
|
||||
|
||||
env = getenv("CURL_SSL_BACKEND");
|
||||
env = env_tmp = curl_getenv("CURL_SSL_BACKEND");
|
||||
#ifdef CURL_DEFAULT_SSL_BACKEND
|
||||
if(!env)
|
||||
env = CURL_DEFAULT_SSL_BACKEND;
|
||||
@ -1282,6 +1283,7 @@ static int multissl_init(const struct Curl_ssl *backend)
|
||||
for(i = 0; available_backends[i]; i++) {
|
||||
if(strcasecompare(env, available_backends[i]->info.name)) {
|
||||
Curl_ssl = available_backends[i];
|
||||
curl_free(env_tmp);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@ -1289,6 +1291,7 @@ static int multissl_init(const struct Curl_ssl *backend)
|
||||
|
||||
/* Fall back to first available backend */
|
||||
Curl_ssl = available_backends[0];
|
||||
curl_free(env_tmp);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user