diff options
| author | Junio C Hamano <gitster@pobox.com> | 2022-12-01 09:14:46 +0900 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2022-12-01 09:14:46 +0900 |
| commit | a61c70a7c890f48678bab8964f9f8d2173fb414a (patch) | |
| tree | 634d5a05d5ea733cb066380d27efb283d664d9cf | |
| parent | e7e5c6f715b2de7bea0d39c7d2ba887335b40aa0 (diff) | |
| parent | e0c08a4f738b3dea7a4e8fe3511c323cf1f41942 (diff) | |
| download | git-a61c70a7c890f48678bab8964f9f8d2173fb414a.tar.xz | |
Merge branch 'jk/avoid-redef-system-functions-2.30' into maint
* jk/avoid-redef-system-functions-2.30:
git-compat-util: avoid redefining system function names
| -rw-r--r-- | git-compat-util.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/git-compat-util.h b/git-compat-util.h index 045b47f83a..32ed03768b 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -338,9 +338,12 @@ struct itimerval { #endif #ifdef NO_SETITIMER -static inline int setitimer(int which, const struct itimerval *value, struct itimerval *newvalue) { +static inline int git_setitimer(int which, + const struct itimerval *value, + struct itimerval *newvalue) { return 0; /* pretend success */ } +#define setitimer(which,value,ovalue) git_setitimer(which,value,ovalue) #endif #ifndef NO_LIBGEN_H @@ -1466,14 +1469,16 @@ int open_nofollow(const char *path, int flags); #endif #ifndef _POSIX_THREAD_SAFE_FUNCTIONS -static inline void flockfile(FILE *fh) +static inline void git_flockfile(FILE *fh) { ; /* nothing */ } -static inline void funlockfile(FILE *fh) +static inline void git_funlockfile(FILE *fh) { ; /* nothing */ } +#define flockfile(fh) git_flockfile(fh) +#define funlockfile(fh) git_funlockfile(fh) #define getc_unlocked(fh) getc(fh) #endif |
