Skip to content

Commit

Permalink
Redefine strdup, open, fdopen as _strdup, _open, _fdopen to avoid lin…
Browse files Browse the repository at this point in the history
…king errors on MSVC
  • Loading branch information
marco-c committed Jun 12, 2017
1 parent 900ba55 commit 8748bdd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/libprofiler_builtins/build.rs
Expand Up @@ -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
Expand Down

0 comments on commit 8748bdd

Please sign in to comment.