Skip to content

Commit c4be7f2

Browse files
committed
Fix mingw compilation
1 parent d7b2096 commit c4be7f2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

environmentvariable.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22

33
#include <stdlib.h>
44
#include <string>
5+
#include <string_view>
56

67
namespace inf::env {
78

89
void set(std::string_view key, std::string_view value)
910
{
10-
#ifdef WIN32
11+
#if defined WIN32 || defined __MINGW32__
1112
_putenv_s(std::string(key).c_str(), std::string(value).c_str());
1213
#else
1314
setenv(std::string(key).c_str(), std::string(value).c_str(), 1);

0 commit comments

Comments
 (0)