summaryrefslogtreecommitdiff
path: root/sysdeps/mach/hurd/send.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2018-12-27 17:45:04 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2018-12-27 17:45:04 +0000
commit6aa82888e61d3e2232926ee68e764f17eae2e7e1 (patch)
tree17b2fb350da15d1d097f22dc7e2e7d20db1bd486 /sysdeps/mach/hurd/send.c
parentffbe9c552a1009167ec7a765c1543c7f3e4169d6 (diff)
parent963c37d5c0eb62b38f8764b23931c0dcdd497a13 (diff)
Merge commit 'refs/top-bases/t/sendmsg-SCM_RIGHTS' into t/sendmsg-SCM_RIGHTS
Diffstat (limited to 'sysdeps/mach/hurd/send.c')
-rw-r--r--sysdeps/mach/hurd/send.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sysdeps/mach/hurd/send.c b/sysdeps/mach/hurd/send.c
index cc7d2a8b86..c7dc907129 100644
--- a/sysdeps/mach/hurd/send.c
+++ b/sysdeps/mach/hurd/send.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1994-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -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)