Skip to content

Commit 00a3a04

Browse files
committed
GH-5 - use $Config{archlib}
1 parent 7ee0e06 commit 00a3a04

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

libperl-sys/build.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ fn main() {
3232
let perl = PerlConfig::default();
3333
perl.emit_cargo_ldopts();
3434

35+
let archlib = String::from(&perl.dict["archlib"]);
36+
let perl_h = Path::new(&archlib).join("CORE/perl.h");
37+
let cop_h = Path::new(&archlib).join("CORE/cop.h");
38+
3539
let ccopts = perl.read_ccopts().unwrap();
3640
println!("# perl ccopts = {:?}, ", ccopts);
3741

@@ -86,8 +90,8 @@ fn main() {
8690

8791
.opaque_type("timex")
8892

89-
.allowlist_file("/usr/lib64/perl5/CORE/perl.h")
90-
.allowlist_file("/usr/lib64/perl5/CORE/cop.h")
93+
.allowlist_file(perl_h.to_str().unwrap())
94+
.allowlist_file(cop_h.to_str().unwrap())
9195
.allowlist_item("opcode")
9296
.allowlist_item("(Perl|perl|PL)_.*")
9397
.allowlist_item("([SAHRGC]V|xpv).*")

0 commit comments

Comments
 (0)