Skip to content

Commit

Permalink
patch libgit2 so 0.21.3 can compile with mingw
Browse files Browse the repository at this point in the history
  • Loading branch information
tkelman committed Dec 19, 2014
1 parent cc0cbfe commit 9d0b866
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions deps/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1788,6 +1788,7 @@ ifeq ($(BUILD_OS),WINNT)
else
$(TAR) zxf $<
endif
cd libgit2-$(LIBGIT2_VER) && patch -p1 < ../libgit2-0.21.3-mingw.patch
touch -c $@
libgit2-$(LIBGIT2_VER)/build/Makefile: libgit2-$(LIBGIT2_VER)/CMakeLists.txt
mkdir -p libgit2-$(LIBGIT2_VER)/build
Expand Down
25 changes: 25 additions & 0 deletions deps/libgit2-0.21.3-mingw.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
diff --git a/src/path.h b/src/path.h
index 6c50334..444337b 100644
--- a/src/path.h
+++ b/src/path.h
@@ -8,6 +8,7 @@
#define INCLUDE_path_h__

#include "common.h"
+#include "posix.h"
#include "buffer.h"
#include "vector.h"

diff --git a/src/win32/path_w32.h b/src/win32/path_w32.h
index 1d10166..033afbb 100644
--- a/src/win32/path_w32.h
+++ b/src/win32/path_w32.h
@@ -7,6 +7,8 @@
#ifndef INCLUDE_git_path_w32_h__
#define INCLUDE_git_path_w32_h__

+#include "common.h"
+
/*
* Provides a large enough buffer to support Windows paths: MAX_PATH is
* 260, corresponding to a maximum path length of 259 characters plus a

0 comments on commit 9d0b866

Please sign in to comment.