]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'jk/avoid-redef-system-functions-2.30' into maint-2.39
authorJunio C Hamano <gitster@pobox.com>
Tue, 14 Feb 2023 22:15:47 +0000 (14:15 -0800)
committerJunio C Hamano <gitster@pobox.com>
Tue, 14 Feb 2023 22:15:47 +0000 (14:15 -0800)
Redefining system functions for a few functions did not follow our
usual "implement git_foo() and #define foo(args) git_foo(args)"
pattern, which has broken build for some folks.

* jk/avoid-redef-system-functions-2.30:
  git-compat-util: undefine system names before redeclaring them
  git-compat-util: avoid redefining system function names

1  2 
git-compat-util.h

index af05077560a6671a143239d57a1912934c7a0f81,09a5f338594a85b98d833d19e06da826245da736..7f84430d0eb505a98a232dad5272f0308f1391a8
@@@ -341,11 -274,13 +341,13 @@@ struct itimerval 
  #endif
  
  #ifdef NO_SETITIMER
- static inline int setitimer(int which UNUSED,
-                           const struct itimerval *value UNUSED,
-                           struct itimerval *newvalue UNUSED) {
 -static inline int git_setitimer(int which,
 -                              const struct itimerval *value,
 -                              struct itimerval *newvalue) {
++static inline int git_setitimer(int which UNUSED,
++                              const struct itimerval *value UNUSED,
++                              struct itimerval *newvalue UNUSED) {
        return 0; /* pretend success */
  }
+ #undef setitimer
+ #define setitimer(which,value,ovalue) git_setitimer(which,value,ovalue)
  #endif
  
  #ifndef NO_LIBGEN_H
@@@ -1479,11 -1316,11 +1481,11 @@@ int open_nofollow(const char *path, in
  #endif
  
  #ifndef _POSIX_THREAD_SAFE_FUNCTIONS
- static inline void flockfile(FILE *fh UNUSED)
 -static inline void git_flockfile(FILE *fh)
++static inline void git_flockfile(FILE *fh UNUSED)
  {
        ; /* nothing */
  }
- static inline void funlockfile(FILE *fh UNUSED)
 -static inline void git_funlockfile(FILE *fh)
++static inline void git_funlockfile(FILE *fh UNUSED)
  {
        ; /* nothing */
  }