diff options
author | Thomas Bushnell, BSG <thomas@gnu.org> | 1996-08-16 20:42:32 +0000 |
---|---|---|
committer | Thomas Bushnell, BSG <thomas@gnu.org> | 1996-08-16 20:42:32 +0000 |
commit | a057e7dcc7912b6440ee15ffb8f1f5823845773e (patch) | |
tree | ea73a65fc10172fd555c33be940966dcc4a65cf6 | |
parent | 2de99474c3d4278fb874bbbc12c24c388f786c21 (diff) | |
download | glibc-a057e7dcc7912b6440ee15ffb8f1f5823845773e.zip glibc-a057e7dcc7912b6440ee15ffb8f1f5823845773e.tar.gz glibc-a057e7dcc7912b6440ee15ffb8f1f5823845773e.tar.bz2 |
*** empty log message ***cvs/libc-960818cvs/libc-960817
-rw-r--r-- | nss/nss_dns/dns-host.c | 10 | ||||
-rw-r--r-- | nss/nss_dns/dns-network.c | 10 | ||||
-rw-r--r-- | sysdeps/mach/hurd/socket.c | 7 |
3 files changed, 23 insertions, 4 deletions
diff --git a/nss/nss_dns/dns-host.c b/nss/nss_dns/dns-host.c index f8116fe..df8677a 100644 --- a/nss/nss_dns/dns-host.c +++ b/nss/nss_dns/dns-host.c @@ -209,7 +209,10 @@ _nss_dns_gethostbyname2_r (const char *name, int af, struct hostent *result, n = res_search (name, C_IN, type, host_buffer.buf, sizeof (host_buffer)); if (n < 0) - return errno == ECONNREFUSED ? NSS_STATUS_UNAVAIL : NSS_STATUS_NOTFOUND; + return (errno == ECONNREFUSED + || errno == EPFNOSUPPORT + || errno == EAFNOSUPPORT) + ? NSS_STATUS_UNAVAIL : NSS_STATUS_NOTFOUND; return getanswer_r (&host_buffer, n, name, type, result, buffer, buflen, h_errnop); @@ -302,7 +305,10 @@ _nss_dns_gethostbyaddr_r (const char *addr, int len, int af, n = res_query (qbuf, C_IN, T_PTR, (u_char *)host_buffer.buf, sizeof host_buffer); if (n < 0) - return errno == ECONNREFUSED ? NSS_STATUS_UNAVAIL : NSS_STATUS_NOTFOUND; + return (errno == ECONNREFUSED + || errno == EPFNOSUPPORT + || errno == EAFNOSUPPORT) + ? NSS_STATUS_UNAVAIL : NSS_STATUS_NOTFOUND; status = getanswer_r (&host_buffer, n, qbuf, T_PTR, result, buffer, buflen, h_errnop); diff --git a/nss/nss_dns/dns-network.c b/nss/nss_dns/dns-network.c index b714128..1b5d0ce 100644 --- a/nss/nss_dns/dns-network.c +++ b/nss/nss_dns/dns-network.c @@ -116,7 +116,10 @@ _nss_dns_getnetbyname_r (const char *name, struct netent *result, sizeof (querybuf)); if (anslen < 0) /* Nothing found. */ - return errno == ECONNREFUSED ? NSS_STATUS_UNAVAIL : NSS_STATUS_NOTFOUND; + return (errno == ECONNREFUSED + || errno == EPFNOSUPPORT + || errno == EAFNOSUPPORT) + ? NSS_STATUS_UNAVAIL : NSS_STATUS_NOTFOUND; return getanswer_r (&net_buffer, anslen, result, buffer, buflen, BYNAME); } @@ -168,7 +171,10 @@ _nss_dns_getnetbyaddr_r (long net, int type, struct netent *result, sizeof (querybuf)); if (anslen < 0) /* Nothing found. */ - return errno == ECONNREFUSED ? NSS_STATUS_UNAVAIL : NSS_STATUS_NOTFOUND; + return (errno == ECONNREFUSED + || errno == EPFNOSUPPORT + || errno == EAFNOSUPPORT) + ? NSS_STATUS_UNAVAIL : NSS_STATUS_NOTFOUND; status = getanswer_r (&net_buffer, anslen, result, buffer, buflen, BYADDR); if (status == NSS_STATUS_SUCCESS) diff --git a/sysdeps/mach/hurd/socket.c b/sysdeps/mach/hurd/socket.c index 423e8fe..a0d770a 100644 --- a/sysdeps/mach/hurd/socket.c +++ b/sysdeps/mach/hurd/socket.c @@ -51,6 +51,13 @@ DEFUN(socket, (domain, type, protocol), err = __socket_create (server, type, protocol, &sock); } + /* These errors all mean that the server node doesn't support the + socket.defs protocol, which we'll take to mean that the protocol + isn't supported. */ + if (err == MACH_SEND_INVALID_DEST || err == MIG_SERVER_DIED + || err == MIG_BAD_ID || err == EOPNOTSUPP) + err = EPFNOSUPPORT; + if (err) return __hurd_fail (err); |