libafl_bolts: fix musl build (#1421)

despite being present in the headers, getcontext is not implemented in
musl libc, most likely due to the fact it s a deprecated interface.
The only way around is having the third party libucontext apk package
installed.
This commit is contained in:
David CARLIER 2023-08-13 11:14:30 +01:00 committed by GitHub
parent dcdfa978a4
commit 698ebb6b35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,9 +2,13 @@
fn main() { fn main() {
println!("cargo:rerun-if-changed=build.rs"); println!("cargo:rerun-if-changed=build.rs");
println!("cargo:rustc-cfg=nightly"); println!("cargo:rustc-cfg=nightly");
#[cfg(target_env = "musl")]
println!("cargo:rustc-link-lib=ucontext");
} }
#[rustversion::not(nightly)] #[rustversion::not(nightly)]
fn main() { fn main() {
println!("cargo:rerun-if-changed=build.rs"); println!("cargo:rerun-if-changed=build.rs");
#[cfg(target_env = "musl")]
println!("cargo:rustc-link-lib=ucontext");
} }