mirror of
https://github.com/git/git.git
synced 2026-01-12 13:53:11 +09:00
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.
This commit is contained in:
parent
eb120e699f
commit
c5445fe090
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user