]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'jk/avoid-redef-system-functions-2.30' into jk/avoid-redef-system-functions
authorJunio C Hamano <gitster@pobox.com>
Mon, 5 Dec 2022 03:16:00 +0000 (12:16 +0900)
committerJunio C Hamano <gitster@pobox.com>
Mon, 5 Dec 2022 03:16:00 +0000 (12:16 +0900)
* jk/avoid-redef-system-functions-2.30:
  git-compat-util: undefine system names before redeclaring them

git-compat-util.h

index 83ec7b7941e653a67efc0e2ccfeaedd6a839b076..76e4b111315339449cd48d17f735f727935c08d8 100644 (file)
@@ -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)