Skip to content

Commit 7a2e703

Browse files
authored
Merge pull request #985 from petefwalter/system-libgit2-1.9.0
ext: Fix the build with system libgit2 1.9.0
2 parents 2fe8ae8 + 5fee507 commit 7a2e703

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ext/rugged/extconf.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,12 @@ def self.run_cmake(timeout, args)
7575
major = minor = nil
7676

7777
File.readlines(File.join(LIBGIT2_DIR, "include", "git2", "version.h")).each do |line|
78-
if !major && (matches = line.match(/^#define LIBGIT2_VER_MAJOR\s+([0-9]+)$/))
78+
if !major && (matches = line.match(/^#define LIBGIT2_VERSION_MAJOR\s+([0-9]+)$/))
7979
major = matches[1]
8080
next
8181
end
8282

83-
if !minor && (matches = line.match(/^#define LIBGIT2_VER_MINOR\s+([0-9]+)$/))
83+
if !minor && (matches = line.match(/^#define LIBGIT2_VERSION_MINOR\s+([0-9]+)$/))
8484
minor = matches[1]
8585
next
8686
end
@@ -89,9 +89,9 @@ def self.run_cmake(timeout, args)
8989
end
9090

9191
try_compile(<<-SRC) or abort "libgit2 version is not compatible, expected ~> #{major}.#{minor}.0"
92-
#include <git2/version.h>
92+
#include <git2.h>
9393
94-
#if LIBGIT2_VER_MAJOR != #{major} || LIBGIT2_VER_MINOR != #{minor}
94+
#if LIBGIT2_VERSION_MAJOR != #{major} || LIBGIT2_VERSION_MINOR != #{minor}
9595
#error libgit2 version is not compatible
9696
#endif
9797
SRC

0 commit comments

Comments
 (0)