Skip to content

Commit 395bec6

Browse files
committed
Merge branch 'jk/avoid-redef-system-functions-2.30' into jk/avoid-redef-system-functions
* jk/avoid-redef-system-functions-2.30: git-compat-util: undefine system names before redeclaring them
2 parents 4948ed4 + e1a95b7 commit 395bec6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

git-compat-util.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,7 @@ static inline int git_setitimer(int which UNUSED,
346346
struct itimerval *newvalue UNUSED) {
347347
return 0; /* pretend success */
348348
}
349+
#undef setitimer
349350
#define setitimer(which,value,ovalue) git_setitimer(which,value,ovalue)
350351
#endif
351352

@@ -1480,6 +1481,9 @@ static inline void git_funlockfile(FILE *fh UNUSED)
14801481
{
14811482
; /* nothing */
14821483
}
1484+
#undef flockfile
1485+
#undef funlockfile
1486+
#undef getc_unlocked
14831487
#define flockfile(fh) git_flockfile(fh)
14841488
#define funlockfile(fh) git_funlockfile(fh)
14851489
#define getc_unlocked(fh) getc(fh)

0 commit comments

Comments
 (0)