about summary refs log tree commit diff
path: root/sysdeps/mach/hurd/send.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/mach/hurd/send.c')
-rw-r--r--sysdeps/mach/hurd/send.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sysdeps/mach/hurd/send.c b/sysdeps/mach/hurd/send.c
index 8eb97e99ee..98ffcbf562 100644
--- a/sysdeps/mach/hurd/send.c
+++ b/sysdeps/mach/hurd/send.c
@@ -33,6 +33,10 @@ __send (int fd, const void *buf, size_t n, int flags)
 					   NULL, MACH_MSG_TYPE_COPY_SEND, 0,
 					   NULL, 0, &wrote));
 
+  if (err == MIG_BAD_ID || err == EOPNOTSUPP)
+    /* The file did not grok the socket protocol.  */
+    err = ENOTSOCK;
+
   return err ? __hurd_sockfail (fd, flags, err) : wrote;
 }
 libc_hidden_def (__send)