From c5445fe0908d0bd8a062e0d29d9dcf4e4962e3c8 Mon Sep 17 00:00:00 2001 From: Johannes Sixt Date: Thu, 8 May 2008 09:34:49 +0200 Subject: [PATCH] compat-util: avoid macro redefinition warning Some systems define fopen as a macro based on compiler settings, and unconditionally redefining it triggers a compilation warning. --- git-compat-util.h | 3 +++ 1 file changed, 3 insertions(+) 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 -- 2.30.2