diff --git a/minix/lib/libc/sys/sendmsg.c b/minix/lib/libc/sys/sendmsg.c index 4d4452cff..846d67dc6 100644 --- a/minix/lib/libc/sys/sendmsg.c +++ b/minix/lib/libc/sys/sendmsg.c @@ -96,6 +96,9 @@ ssize_t sendmsg(int sock, const struct msghdr *msg, int flags) return -1; } + /* For old socket driver implementations, this flag is the default. */ + flags &= ~MSG_NOSIGNAL; + r= ioctl(sock, NWIOGUDSSOTYPE, &uds_sotype); if (r != -1 || errno != ENOTTY) { if (r == -1) { diff --git a/minix/lib/libc/sys/sendto.c b/minix/lib/libc/sys/sendto.c index 77304f301..c194c8182 100644 --- a/minix/lib/libc/sys/sendto.c +++ b/minix/lib/libc/sys/sendto.c @@ -66,6 +66,9 @@ ssize_t sendto(int sock, const void *message, size_t length, int flags, if (r != -1 || (errno != ENOTSOCK && errno != ENOSYS)) return r; + /* For old socket driver implementations, this flag is the default. */ + flags &= ~MSG_NOSIGNAL; + r= ioctl(sock, NWIOGTCPOPT, &tcpopt); if (r != -1 || errno != ENOTTY) { diff --git a/sys/sys/socket.h b/sys/sys/socket.h index 6b3a1190c..219b90baf 100644 --- a/sys/sys/socket.h +++ b/sys/sys/socket.h @@ -521,9 +521,7 @@ struct msghdr { #define MSG_DONTWAIT 0x0080 /* this message should be nonblocking */ #define MSG_BCAST 0x0100 /* this message was rcvd using link-level brdcst */ #define MSG_MCAST 0x0200 /* this message was rcvd using link-level mcast */ -#if !defined(__minix) #define MSG_NOSIGNAL 0x0400 /* do not generate SIGPIPE on EOF */ -#endif /* !defined(__minix) */ #if defined(_NETBSD_SOURCE) #define MSG_CMSG_CLOEXEC 0x0800 /* close on exec receiving fd */ #define MSG_NBIO 0x1000 /* use non-blocking I/O */