Skip to content

Commit 2d368b5

Browse files
committed
NetBSD: link libstd with librt in addition to libpthread
1 parent 87a3c1e commit 2d368b5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/libstd/build.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,11 @@ fn main() {
4141
} else if target.contains("freebsd") {
4242
println!("cargo:rustc-link-lib=execinfo");
4343
println!("cargo:rustc-link-lib=pthread");
44+
} else if target.contains("netbsd") {
45+
println!("cargo:rustc-link-lib=pthread");
46+
println!("cargo:rustc-link-lib=rt");
4447
} else if target.contains("dragonfly") || target.contains("bitrig") ||
45-
target.contains("netbsd") || target.contains("openbsd") {
48+
target.contains("openbsd") {
4649
println!("cargo:rustc-link-lib=pthread");
4750
} else if target.contains("solaris") {
4851
println!("cargo:rustc-link-lib=socket");

0 commit comments

Comments
 (0)