Skip to content

Commit

Permalink
Use -pthread, and on more platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
justsmth committed Oct 4, 2024
1 parent 671415f commit 9348d97
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions aws-lc-sys/builder/cc_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,12 @@ impl CcBuilder {
let compiler = cc_build.get_compiler();
if compiler.is_like_gnu() || compiler.is_like_clang() {
cc_build.flag("-Wno-unused-parameter");
if target_os() == "linux" || target_env() == "gnu" {
cc_build.define("_XOPEN_SOURCE", "700").flag("-lpthread");
if target_os() == "linux"
|| target_os().ends_with("bsd")
|| target_env() == "gnu"
|| target_env() == "musl"
{
cc_build.define("_XOPEN_SOURCE", "700").flag("-pthread");
}
}

Expand Down

0 comments on commit 9348d97

Please sign in to comment.