diff options
Diffstat (limited to 'sysdeps/mach/hurd/send.c')
-rw-r--r-- | sysdeps/mach/hurd/send.c | 6 |
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) |