Redefine strdup, open, fdopen as _strdup, _open, _fdopen to avoid linking errors on MSVC

This commit is contained in:
Marco Castelluccio 2017-06-12 23:08:57 +01:00
parent 900ba559b6
commit 8748bdd353

View File

@ -39,6 +39,9 @@ fn main() {
// Don't pull in extra libraries on MSVC
cfg.flag("/Zl");
profile_sources.push("WindowsMMap.c");
cfg.define("strdup", Some("_strdup"));
cfg.define("open", Some("_open"));
cfg.define("fdopen", Some("_fdopen"));
} else {
// Turn off various features of gcc and such, mostly copying
// compiler-rt's build system already