Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,11 @@ fn main() {

let (compiler, mut cflags) = if vendored_libbpf || vendored_libelf || vendored_zlib {
pkg_check("make");
pkg_check("pkg-config");
pkg_check(
std::env::var("PKG_CONFIG")
.as_deref()
.unwrap_or("pkg-config"),
);

let compiler = cc::Build::new().try_get_compiler().expect(
"a C compiler is required to compile libbpf-sys using the vendored copy of libbpf",
Expand Down Expand Up @@ -246,7 +250,7 @@ fn open_lockable(path: &Path) -> io::Result<File> {
// with write permissions. So just open for reading and hope
// for the best.
File::open(path)
},
}
e @ Err(..) => e,
}
}
Expand Down
Loading