aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--git-compat-util.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/git-compat-util.h b/git-compat-util.h
index 167c3fe63..01c4045e8 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -206,6 +206,9 @@ void *gitmemmem(const void *haystack, size_t haystacklen,
#endif
#ifdef FREAD_READS_DIRECTORIES
+#ifdef fopen
+#undef fopen
+#endif
#define fopen(a,b) git_fopen(a,b)
extern FILE *git_fopen(const char*, const char*);
#endif