summaryrefslogtreecommitdiff
path: root/sysdeps/mach/hurd/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/mach/hurd/socket.c')
-rw-r--r--sysdeps/mach/hurd/socket.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sysdeps/mach/hurd/socket.c b/sysdeps/mach/hurd/socket.c
index 423e8fe8b1..a0d770ad5c 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);