diff options
author | Timo Sirainen <cras@irssi.org> | 2001-11-10 20:15:24 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2001-11-10 20:15:24 +0000 |
commit | 712f3b383da947f5c565fba3695dbcd02136ce4b (patch) | |
tree | 3885609dcedb0bdf299768741c9ff311e7baac09 | |
parent | 9abd8576183f2140e8dd18c0ae66a45a26aee5bb (diff) | |
download | irssi-712f3b383da947f5c565fba3695dbcd02136ce4b.zip |
net_listen(): if creating IPv6 socket fails because of EPROTONOSUPPORT, try
without IPv6.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1979 dbcabf3a-b0e7-0310-adc4-f8d773084564
-rw-r--r-- | src/core/network.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/network.c b/src/core/network.c index 774815fd..2ad7d4ff 100644 --- a/src/core/network.c +++ b/src/core/network.c @@ -249,7 +249,7 @@ GIOChannel *net_listen(IPADDR *my_ip, int *port) /* create the socket */ handle = socket(so.sin.sin_family, SOCK_STREAM, 0); #ifdef HAVE_IPV6 - if (handle == -1 && errno == EINVAL) { + if (handle == -1 && (errno == EINVAL || errno == EPROTONOSUPPORT)) { /* IPv6 is not supported by OS */ so.sin.sin_family = AF_INET; so.sin.sin_addr.s_addr = INADDR_ANY; |