public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] Cygwin: Use SO_EXCLUSIVEADDRUSE
@ 2018-02-05 20:07 Corinna Vinschen
0 siblings, 0 replies; only message in thread
From: Corinna Vinschen @ 2018-02-05 20:07 UTC (permalink / raw)
To: cygwin-cvs
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=9dc34cea28d55c91a5b751530daf39a697cd1794
commit 9dc34cea28d55c91a5b751530daf39a697cd1794
Author: Corinna Vinschen <corinna@vinschen.de>
Date: Mon Feb 5 19:22:47 2018 +0100
Cygwin: Use SO_EXCLUSIVEADDRUSE
We're still using ~SO_REUSEADDR because SO_EXCLUSIVEADDRUSE wasn't
defined in Mingw. But it is in Mingw-w64, so fix it.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diff:
---
winsup/cygwin/fhandler_socket.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/winsup/cygwin/fhandler_socket.cc b/winsup/cygwin/fhandler_socket.cc
index cc75b97..6eac689 100644
--- a/winsup/cygwin/fhandler_socket.cc
+++ b/winsup/cygwin/fhandler_socket.cc
@@ -1154,7 +1154,7 @@ fhandler_socket::bind (const struct sockaddr *name, int namelen)
for a more detailed description. */
int on = 1;
int ret = ::setsockopt (get_socket (), SOL_SOCKET,
- ~(SO_REUSEADDR),
+ SO_EXCLUSIVEADDRUSE,
(const char *) &on, sizeof on);
debug_printf ("%d = setsockopt(SO_EXCLUSIVEADDRUSE), %E", ret);
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-02-05 20:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-05 20:07 [newlib-cygwin] Cygwin: Use SO_EXCLUSIVEADDRUSE Corinna Vinschen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).