Skip to content

Commit 0c4585f

Browse files
fabiomestrekbenzie
authored andcommitted
Fix windows build
1 parent 8a05674 commit 0c4585f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

test/conformance/source/environment.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
#include <uur/environment.h>
1616
#include <uur/utils.h>
17+
#include <ur_util.hpp>
1718

1819
namespace uur {
1920

@@ -183,9 +184,9 @@ PlatformEnvironment::parsePlatformOptions(int argc, char **argv) {
183184
/* If a platform was not provided using the --platform command line option,
184185
* check if environment variable is set to use as a fallback. */
185186
if (options.platform_name.empty()) {
186-
const char *env_platform = std::getenv("UR_CTS_ADAPTER_PLATFORM");
187-
if (env_platform) {
188-
options.platform_name = env_platform;
187+
auto env_platform = ur_getenv("UR_CTS_ADAPTER_PLATFORM");
188+
if (env_platform.has_value()) {
189+
options.platform_name = env_platform.value();
189190
}
190191
}
191192

0 commit comments

Comments
 (0)