diff options
| author | Marco Castelluccio <mcastelluccio@mozilla.com> | 2017-06-12 23:08:57 +0100 |
|---|---|---|
| committer | Marco Castelluccio <mcastelluccio@mozilla.com> | 2017-06-12 23:08:57 +0100 |
| commit | 8748bdd353e7d8744fdbb3c1c1b2e6c7f424b065 (patch) | |
| tree | ec3b5a628bd5b79929b832f4f9a691ea734a9bef | |
| parent | 900ba559b637b6d99bc95e6f0d270543713096fd (diff) | |
| download | rust-8748bdd353e7d8744fdbb3c1c1b2e6c7f424b065.tar.gz rust-8748bdd353e7d8744fdbb3c1c1b2e6c7f424b065.zip | |
Redefine strdup, open, fdopen as _strdup, _open, _fdopen to avoid linking errors on MSVC
| -rw-r--r-- | src/libprofiler_builtins/build.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libprofiler_builtins/build.rs b/src/libprofiler_builtins/build.rs index 4397d2ebb21..1ee284ff4da 100644 --- a/src/libprofiler_builtins/build.rs +++ b/src/libprofiler_builtins/build.rs @@ -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 |
