Skip to content

Commit f823290

Browse files
author
Tobias Kortkamp
authored
Define HAVE_KERN_PROC on FreeBSD to fix rust-lang/rust#54434 (#294)
* Define HAVE_KERN_PROC on FreeBSD to fix rust-lang/rust#54434 For the same reason define HAVE_KERN_PROC_ARGS on NetBSD. This depends on having [1] available in libbacktrace. [1] ianlancetaylor/libbacktrace@0f06cda * Add dragonfly too
1 parent 4c83b0c commit f823290

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

crates/backtrace-sys/build.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,12 @@ fn main() {
7272
File::create(out_dir.join("config.h")).unwrap();
7373
if target.contains("android") {
7474
maybe_enable_dl_iterate_phdr_android(&mut build);
75+
} else if target.contains("dragonfly") || target.contains("freebsd") {
76+
build.define("HAVE_DL_ITERATE_PHDR", "1");
77+
build.define("HAVE_KERN_PROC", "1");
78+
} else if target.contains("netbsd") {
79+
build.define("HAVE_DL_ITERATE_PHDR", "1");
80+
build.define("HAVE_KERN_PROC_ARGS", "1");
7581
} else if !target.contains("apple-ios")
7682
&& !target.contains("solaris")
7783
&& !target.contains("redox")

0 commit comments

Comments
 (0)