Android adaptations

This commit is contained in:
Ahmed Yarub Hani Al Nuaimi
2021-09-19 14:26:42 -03:00
parent 6b98698c92
commit f264e268f7
2 changed files with 4 additions and 4 deletions

View File

@@ -45,7 +45,7 @@ static int setBasePathInCluster(char **pBasePath)
{
static char fname[] = "setBasePathInCluster()";
#ifndef _WIN32
#ifdef __linux
const char *service_host_env = secure_getenv(SERVICE_HOST_ENV_NAME);
#else
const char *service_host_env = getenv(SERVICE_HOST_ENV_NAME);
@@ -54,7 +54,7 @@ static int setBasePathInCluster(char **pBasePath)
fprintf(stderr, "%s: Cannot retrieve the kubernetes service host inside a pod by the env %s.\n", fname, SERVICE_HOST_ENV_NAME);
return -1;
}
#ifndef _WIN32
#ifdef __linux
const char *service_port_env = secure_getenv(SERVICE_PORT_ENV_NAME);
#else
const char *service_port_env = getenv(SERVICE_PORT_ENV_NAME);

View File

@@ -110,7 +110,7 @@ static char *getWorkingConfigFile(const char *configFileNamePassedIn)
if (configFileNamePassedIn) {
configFileName = strdup(configFileNamePassedIn);
} else {
#ifndef _WIN32
#ifdef __linux
kubeconfig_env = secure_getenv(ENV_KUBECONFIG);
#else
kubeconfig_env = getenv(ENV_KUBECONFIG);
@@ -118,7 +118,7 @@ static char *getWorkingConfigFile(const char *configFileNamePassedIn)
if (kubeconfig_env) {
configFileName = strdup(kubeconfig_env);
} else {
#ifndef _WIN32
#ifdef __linux
homedir_env = secure_getenv(ENV_HOME);
#else
homedir_env = getenv(ENV_HOME);