aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2022-12-05 12:16:00 +0900
committerJunio C Hamano <gitster@pobox.com>2022-12-05 12:16:00 +0900
commit395bec6b3930ce3e23ef90bfb01be4922b21259e (patch)
tree14a016e2c23054744c3d8cff1baab16b72e44d45
parent4948ed473168a36d1ca03765c599e95258a29715 (diff)
parente1a95b78d8a26762ea04332de8b7c3878da51522 (diff)
downloadgit-395bec6b3930ce3e23ef90bfb01be4922b21259e.tar.gz
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
-rw-r--r--git-compat-util.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/git-compat-util.h b/git-compat-util.h
index 83ec7b7941..76e4b11131 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -346,6 +346,7 @@ static inline int git_setitimer(int which UNUSED,
struct itimerval *newvalue UNUSED) {
return 0; /* pretend success */
}
+#undef setitimer
#define setitimer(which,value,ovalue) git_setitimer(which,value,ovalue)
#endif
@@ -1480,6 +1481,9 @@ static inline void git_funlockfile(FILE *fh UNUSED)
{
; /* nothing */
}
+#undef flockfile
+#undef funlockfile
+#undef getc_unlocked
#define flockfile(fh) git_flockfile(fh)
#define funlockfile(fh) git_funlockfile(fh)
#define getc_unlocked(fh) getc(fh)