(listen_v4, listen_v6): handle the case of the protocol not being

supported


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@6690 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
1999-08-03 22:23:15 +00:00
parent 2d3c3ba942
commit f9ed687f65

View File

@@ -76,6 +76,8 @@ listen_v4 (int port)
s = socket(AF_INET, SOCK_STREAM, 0);
if(s < 0) {
if (errno == ENOSYS)
return -1;
perror("socket");
exit(1);
}
@@ -104,8 +106,10 @@ listen_v6 (int port)
s = socket(AF_INET6, SOCK_STREAM, 0);
if(s < 0) {
perror("socket");
exit(1);
if (errno == ENOSYS)
return -1;
perror("socket");
exit(1);
}
socket_set_reuseaddr (s, 1);
memset(&sa, 0, sizeof(sa));