mirror of
https://code.videolan.org/videolan/vlc
synced 2024-10-03 01:31:53 +02:00
rootwrap: work around missing MSG_NOSIGNAL on old BSD derivatives
This commit is contained in:
parent
499145b80d
commit
2193b044d6
@ -44,10 +44,12 @@
|
||||
# warning Uho, your IPv6 support is broken and has been disabled. Fix your C library.
|
||||
# undef AF_INET6
|
||||
#endif
|
||||
|
||||
#ifndef AF_LOCAL
|
||||
# define AF_LOCAL AF_UNIX
|
||||
#endif
|
||||
#if !defined(MSG_NOSIGNAL) && defined(SO_NOSIGPIPE)
|
||||
# define MSG_NOSIGNAL 0
|
||||
#endif
|
||||
/* Required yet non-standard cmsg functions */
|
||||
#ifndef CMSG_ALIGN
|
||||
# define CMSG_ALIGN(len) (((len) + sizeof(intptr_t)-1) & ~(sizeof(intptr_t)-1))
|
||||
|
@ -57,6 +57,12 @@ int rootwrap_bind (int, int, int, const struct sockaddr *, size_t);
|
||||
#ifndef CMSG_LEN
|
||||
# define CMSG_LEN(len) (CMSG_ALIGN(sizeof(struct cmsghdr)) + (len))
|
||||
#endif
|
||||
#if !defined(MSG_NOSIGNAL)
|
||||
/* If the other end of the pipe hangs up and MSG_NOSIGNAL is missing, the
|
||||
* process will get a (likely fatal) SIGPIPE signal. Then again, the other end
|
||||
* can screw us up in various ways already (e.g. not answer to deadlock). */
|
||||
# define MSG_NOSIGNAL 0
|
||||
#endif
|
||||
|
||||
#if defined(__OS2__) && !defined(ALIGN)
|
||||
/* CMSG_NXTHDR requires this */
|
||||
|
Loading…
Reference in New Issue
Block a user