From c3e05bafa5486120117994d11f38172d3752127d Mon Sep 17 00:00:00 2001 From: Marc Schlaich Date: Mon, 25 Nov 2013 16:19:42 +0100 Subject: [PATCH 1/3] gitignore: ignore *.pyc files The gyp build on Windows produces a *.pyc file as of commit 991409e. --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 3f4c5193..afa05394 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ *.l[oa] *.opensdf *.orig +*.pyc *.sdf *.suo core From 74457d08ba6408d1ce5ff965b113f237c0cf6e51 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Mon, 25 Nov 2013 16:09:55 +0100 Subject: [PATCH 2/3] linux: fix up SO_REUSEPORT back-port Commit 3d2c820 back-ports a patch from the master branch that disables the use of SO_REUSEPORT on Linux for reasons mentioned in the commit log. Unfortunately, the back-port was incomplete; another setsockopt() call site in src/unix/udp.c was overlooked. This commit rectifies that. Hat tip to Luca Bruno for helping troubleshoot the issue. --- src/unix/udp.c | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/src/unix/udp.c b/src/unix/udp.c index ea437a3e..e83e6133 100644 --- a/src/unix/udp.c +++ b/src/unix/udp.c @@ -491,7 +491,7 @@ int uv__udp_bind6(uv_udp_t* handle, struct sockaddr_in6 addr, unsigned flags) { int uv_udp_open(uv_udp_t* handle, uv_os_sock_t sock) { int saved_errno; int status; - int yes; + int err; saved_errno = errno; status = -1; @@ -502,28 +502,12 @@ int uv_udp_open(uv_udp_t* handle, uv_os_sock_t sock) { goto out; } - yes = 1; - if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof yes) == -1) { - uv__set_sys_error(handle->loop, errno); + err = uv__set_reuse(sock); + if (err) { + uv__set_sys_error(handle->loop, -err); goto out; } - /* On the BSDs, SO_REUSEADDR lets you reuse an address that's in the TIME_WAIT - * state (i.e. was until recently tied to a socket) while SO_REUSEPORT lets - * multiple processes bind to the same address. Yes, it's something of a - * misnomer but then again, SO_REUSEADDR was already taken. - * - * None of the above applies to Linux: SO_REUSEADDR implies SO_REUSEPORT on - * Linux and hence it does not have SO_REUSEPORT at all. - */ -#ifdef SO_REUSEPORT - yes = 1; - if (setsockopt(sock, SOL_SOCKET, SO_REUSEPORT, &yes, sizeof yes) == -1) { - uv__set_sys_error(handle->loop, errno); - goto out; - } -#endif - handle->io_watcher.fd = sock; status = 0; From 7bb7371fc5ad7cdabcf997e5002d5fe8f5e47abd Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Wed, 27 Nov 2013 17:28:02 +0100 Subject: [PATCH 3/3] build: make `./gyp_uv.py -f eclipse` work The eclipse backend (like the ninja backend) does not support the --generator_output switch. --- gyp_uv.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gyp_uv.py b/gyp_uv.py index 651bd095..4ba69167 100755 --- a/gyp_uv.py +++ b/gyp_uv.py @@ -75,7 +75,7 @@ if __name__ == '__main__': if sys.platform != 'win32': if '-f' not in args: args.extend('-f make'.split()) - if 'ninja' not in args: + if 'eclipse' not in args and 'ninja' not in args: args.extend(['-Goutput_dir=' + output_dir]) args.extend(['--generator-output', output_dir]) (major, minor), is_clang = compiler_version()