diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-11-28 09:56:45 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-11-28 09:56:45 +0000 |
commit | fb4b89b2b6849966cb05837a97f2e4b404d341e4 (patch) | |
tree | b58e13349f2a3b1d8ac4649664b75de07975d4f5 /ext/socket/socket.c | |
parent | 736a0555383bd633bd6a9b050f0c7b61bb037b0f (diff) | |
download | ruby-fb4b89b2b6849966cb05837a97f2e4b404d341e4.tar.gz ruby-fb4b89b2b6849966cb05837a97f2e4b404d341e4.tar.xz ruby-fb4b89b2b6849966cb05837a97f2e4b404d341e4.zip |
* ext/socket/socket.c (init_inetsock_internal): remove setting
SO_REUSEADDR option on server socket on Cygwin.
fixed: [ruby-core:6765] ([ ruby-Bugs-2872 ])
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@9627 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/socket.c')
-rw-r--r-- | ext/socket/socket.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/socket/socket.c b/ext/socket/socket.c index 286de4b6f..c29d4bc75 100644 --- a/ext/socket/socket.c +++ b/ext/socket/socket.c @@ -1179,6 +1179,11 @@ init_inetsock_internal(arg) } arg->fd = fd; if (type == INET_SERVER) { +#if !defined(_WIN32) && !defined(__CYGWIN__) + status = 1; + setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, + (char*)&status, sizeof(status)); +#endif status = bind(fd, res->ai_addr, res->ai_addrlen); syscall = "bind(2)"; } |