Skip to content

Commit

Permalink
Haiku: fix initial platform support
Browse files Browse the repository at this point in the history
  • Loading branch information
jessicah committed Apr 22, 2017
1 parent 535ee6c commit e1afddc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/librustc_back/target/haiku_base.rs
Expand Up @@ -16,9 +16,10 @@ pub fn opts() -> TargetOptions {
linker: "cc".to_string(),
dynamic_linking: true,
executables: true,
has_rpath: true,
has_rpath: false,
target_family: Some("unix".to_string()),
linker_is_gnu: true,
no_integrated_as: true,
.. Default::default()
}
}
1 change: 1 addition & 0 deletions src/librustc_data_structures/flock.rs
Expand Up @@ -113,6 +113,7 @@ mod imp {
pub l_sysid: libc::c_int,
}

pub const F_RDLCK: libc::c_short = 0x0040;
pub const F_UNLCK: libc::c_short = 0x0200;
pub const F_WRLCK: libc::c_short = 0x0400;
pub const F_SETLK: libc::c_int = 0x0080;
Expand Down
2 changes: 2 additions & 0 deletions src/libunwind/build.rs
Expand Up @@ -39,5 +39,7 @@ fn main() {
println!("cargo:rustc-link-lib=static-nobundle=pthread");
} else if target.contains("fuchsia") {
println!("cargo:rustc-link-lib=unwind");
} else if target.contains("haiku") {
println!("cargo:rustc-link-lib=gcc_s");
}
}

0 comments on commit e1afddc

Please sign in to comment.