diff --git a/compat/mingw.c b/compat/mingw.c index f464fdb63d..befdb147ca 100644 --- a/compat/mingw.c +++ b/compat/mingw.c @@ -315,10 +315,6 @@ char *mingw_getcwd(char *pointer, int len) return ret; } -void sync(void) -{ -} - void openlog(const char *ident, int option, int facility) { } diff --git a/git-compat-util.h b/git-compat-util.h index 71887ee6ae..d0c0884fc9 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -505,9 +505,9 @@ int mingw_socket(int domain, int type, int protocol); int mingw_rename(const char*, const char*); #define rename mingw_rename -#define setlinebuf(x) -#define fsync(x) 0 -#define getppid() 1 +static inline int fsync(int fd) { return 0; } +static inline int getppid(void) { return 1; } +static inline void sync(void) {} extern void quote_argv(const char **dst, const char **src); extern const char *parse_interpreter(const char *cmd);