From da254af8d568e0d3451216313d33b06b54a26130 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Mon, 8 Jun 2015 07:24:04 -0400 Subject: [PATCH] Fix MinGW compiler error, bug929. --- Changes | 2 ++ src/V3Os.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Changes b/Changes index 18dc6825e..d8decbde6 100644 --- a/Changes +++ b/Changes @@ -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] diff --git a/src/V3Os.cpp b/src/V3Os.cpp index 37b769a6a..d7031e096 100644 --- a/src/V3Os.cpp +++ b/src/V3Os.cpp @@ -55,7 +55,7 @@ void V3Os::setenvStr(const string& envvar, const string& value, const string& wh } else { UINFO(1,"export "<= 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