summaryrefslogtreecommitdiff
path: root/hurd/hurd/fd.h
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2008-07-03 12:21:19 +0000
committerJakub Jelinek <jakub@redhat.com>2008-07-03 12:21:19 +0000
commit1cb6b555a864f401c8a2ba75814e982b66a62971 (patch)
tree506eb1640092c658b5e31474916d143d7be0200e /hurd/hurd/fd.h
parente6042ff1eea1f5259df14cf42961898e6c9e6cb1 (diff)
Updated to fedora-glibc-20080703T1203cvs/fedora-glibc-2_8_90-8
Diffstat (limited to 'hurd/hurd/fd.h')
-rw-r--r--hurd/hurd/fd.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/hurd/hurd/fd.h b/hurd/hurd/fd.h
index 08d4407e88..d1aa867cbf 100644
--- a/hurd/hurd/fd.h
+++ b/hurd/hurd/fd.h
@@ -27,6 +27,7 @@
#include <hurd/hurd_types.h>
#include <hurd/port.h>
+#include <sys/socket.h>
/* Structure representing a file descriptor. */
@@ -179,6 +180,18 @@ __hurd_dfail (int fd, error_t err)
errno = _hurd_fd_error (fd, err);
return -1;
}
+
+/* Likewise, but do not raise SIGPIPE on EPIPE if flags contain
+ MSG_NOSIGNAL. */
+
+_HURD_FD_H_EXTERN_INLINE int
+__hurd_sockfail (int fd, int flags, error_t err)
+{
+ if (!(flags & MSG_NOSIGNAL) || err != EPIPE)
+ err = _hurd_fd_error (fd, err);
+ errno = err;
+ return -1;
+}
/* Set up *FD to have PORT its server port, doing appropriate ctty magic.
Does no locking or unlocking. */