From f9ed687f6577f3df733cf31c5da1046b7ba8f21c Mon Sep 17 00:00:00 2001 From: Assar Westerlund Date: Tue, 3 Aug 1999 22:23:15 +0000 Subject: [PATCH] (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 --- lib/roken/mini_inetd.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/roken/mini_inetd.c b/lib/roken/mini_inetd.c index 1a61e72be..79340823d 100644 --- a/lib/roken/mini_inetd.c +++ b/lib/roken/mini_inetd.c @@ -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));