- # CentOS 7.x ships Inline 0.53, 0.64+ has built-in locking
- flock($lockfh, LOCK_EX) or die "LOCK_EX failed on $f: $!\n";
+ # we use Capitalized and ALLCAPS for compatibility with old Inline::C
+ eval <<'EOM';
+use Inline C => Config => %CFG, BOOT => q[git_libgit2_init();];
+use Inline C => $c_src, BUILD_NOISY => 1;
+EOM
+ $err = $@;
+ open(STDERR, '>&', $olderr) or warn "restore stderr: $!";
+ open(STDOUT, '>&', $oldout) or warn "restore stdout: $!";
+ if ($err) {
+ seek($fh, 0, SEEK_SET);
+ my @msg = <$fh>;
+ die "Inline::C Gcf2 build failed:\n", $err, "\n", @msg;
+ }