From: Junio C Hamano Date: Mon, 8 Aug 2016 21:21:37 +0000 (-0700) Subject: Merge branch 'ew/daemon-socket-keepalive' into maint X-Git-Tag: v2.9.3~38 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/172b811322e30ecb3cd660319890e41bc40006bc?ds=inline;hp=-c Merge branch 'ew/daemon-socket-keepalive' into maint Recent update to "git daemon" tries to enable the socket-level KEEPALIVE, but when it is spawned via inetd, the standard input file descriptor may not necessarily be connected to a socket. Suppress an ENOTSOCK error from setsockopt(). * ew/daemon-socket-keepalive: Windows: add missing definition of ENOTSOCK daemon: ignore ENOTSOCK from setsockopt --- 172b811322e30ecb3cd660319890e41bc40006bc diff --combined compat/mingw.h index 9a8803b876,7489d2980e..ef22cbb05d --- a/compat/mingw.h +++ b/compat/mingw.h @@@ -73,6 -73,9 +73,9 @@@ typedef int pid_t #ifndef ECONNABORTED #define ECONNABORTED WSAECONNABORTED #endif + #ifndef ENOTSOCK + #define ENOTSOCK WSAENOTSOCK + #endif struct passwd { char *pw_name; @@@ -142,7 -145,6 +145,7 @@@ static inline int fcntl(int fd, int cmd #define sigemptyset(x) (void)0 static inline int sigaddset(sigset_t *set, int signum) { return 0; } +#define SIG_BLOCK 0 #define SIG_UNBLOCK 0 static inline int sigprocmask(int how, const sigset_t *set, sigset_t *oldset) { return 0; } @@@ -407,7 -409,7 +410,7 @@@ static inline void convert_slashes(cha int mingw_offset_1st_component(const char *path); #define offset_1st_component mingw_offset_1st_component #define PATH_SEP ';' -#ifndef __MINGW64_VERSION_MAJOR +#if !defined(__MINGW64_VERSION_MAJOR) && (!defined(_MSC_VER) || _MSC_VER < 1800) #define PRIuMAX "I64u" #define PRId64 "I64d" #else @@@ -417,6 -419,9 +420,6 @@@ void mingw_open_html(const char *path); #define open_html mingw_open_html -void mingw_mark_as_git_dir(const char *dir); -#define mark_as_git_dir mingw_mark_as_git_dir - /** * Converts UTF-8 encoded string to UTF-16LE. * @@@ -532,8 -537,8 +535,8 @@@ extern CRITICAL_SECTION pinfo_cs * A replacement of main() that adds win32 specific initialization. */ -void mingw_startup(); -#define main(c,v) dummy_decl_mingw_main(); \ +void mingw_startup(void); +#define main(c,v) dummy_decl_mingw_main(void); \ static int mingw_main(c,v); \ int main(int argc, char **argv) \ { \