diff options
Diffstat (limited to 'compat')
-rw-r--r-- | compat/cygwin.c | 2 | ||||
-rw-r--r-- | compat/fnmatch/fnmatch.c | 4 | ||||
-rw-r--r-- | compat/mingw.c | 7 | ||||
-rw-r--r-- | compat/mingw.h | 3 |
4 files changed, 15 insertions, 1 deletions
diff --git a/compat/cygwin.c b/compat/cygwin.c index b4a51b958c..ba3327f1f9 100644 --- a/compat/cygwin.c +++ b/compat/cygwin.c @@ -101,7 +101,7 @@ static int cygwin_stat(const char *path, struct stat *buf) * and calling git_default_config() from here would break such variables. */ static int native_stat = 1; -static int core_filemode; +static int core_filemode = 1; /* matches trust_executable_bit default */ static int git_cygwin_config(const char *var, const char *value, void *cb) { diff --git a/compat/fnmatch/fnmatch.c b/compat/fnmatch/fnmatch.c index 14feac7fe1..9473aed2bb 100644 --- a/compat/fnmatch/fnmatch.c +++ b/compat/fnmatch/fnmatch.c @@ -127,6 +127,10 @@ extern char *getenv (); extern int errno; # endif +# ifndef NULL +# define NULL 0 +# endif + /* This function doesn't exist on most systems. */ # if !defined HAVE___STRCHRNUL && !defined _LIBC diff --git a/compat/mingw.c b/compat/mingw.c index 4423961768..f6e9ff7762 100644 --- a/compat/mingw.c +++ b/compat/mingw.c @@ -1381,6 +1381,13 @@ int mingw_setsockopt(int sockfd, int lvl, int optname, void *optval, int optlen) return setsockopt(s, lvl, optname, (const char*)optval, optlen); } +#undef shutdown +int mingw_shutdown(int sockfd, int how) +{ + SOCKET s = (SOCKET)_get_osfhandle(sockfd); + return shutdown(s, how); +} + #undef listen int mingw_listen(int sockfd, int backlog) { diff --git a/compat/mingw.h b/compat/mingw.h index 62eccd3391..547568b918 100644 --- a/compat/mingw.h +++ b/compat/mingw.h @@ -217,6 +217,9 @@ int mingw_bind(int sockfd, struct sockaddr *sa, size_t sz); int mingw_setsockopt(int sockfd, int lvl, int optname, void *optval, int optlen); #define setsockopt mingw_setsockopt +int mingw_shutdown(int sockfd, int how); +#define shutdown mingw_shutdown + int mingw_listen(int sockfd, int backlog); #define listen mingw_listen |