Fix MinGW compiler error, bug929.

This commit is contained in:
Wilson Snyder 2015-06-08 07:24:04 -04:00
parent 98123dc422
commit da254af8d5
2 changed files with 3 additions and 1 deletions

View File

@ -5,6 +5,8 @@ indicates the contributor was also the author of the fix; Thanks!
* Verilator 3.875 devel
**** Fix MinGW compiler error, bug929. [Hans Tichelaar]
* Verilator 3.874 2015-06-06
*** Add pkg-config .pc file, bug919. [Stefan Wallentowitz]

View File

@ -55,7 +55,7 @@ void V3Os::setenvStr(const string& envvar, const string& value, const string& wh
} else {
UINFO(1,"export "<<envvar<<"="<<value<<endl);
}
#if defined(_BSD_SOURCE) || (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L)
#if !defined(__MINGW32__) && (defined(_BSD_SOURCE) || (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L))
setenv(envvar.c_str(),value.c_str(),true);
#else
//setenv() replaced by putenv() in MinGW/Solaris environment. Prototype is different