diff options
| author | Philip Withnall <philip@tecnocode.co.uk> | 2014-11-03 09:49:03 +0000 |
|---|---|---|
| committer | Pekka Paalanen <pekka.paalanen@collabora.co.uk> | 2014-11-05 14:13:50 +0200 |
| commit | cb00e27039d3b1b4475150b2468066adb99984dc (patch) | |
| tree | 7a6dd8eae014231e98050b929b5118c037490428 /src/connection.c | |
| parent | Protocol : Added destructor to wl_data_device interface (diff) | |
| download | wayland-cb00e27039d3b1b4475150b2468066adb99984dc.tar wayland-cb00e27039d3b1b4475150b2468066adb99984dc.tar.gz wayland-cb00e27039d3b1b4475150b2468066adb99984dc.tar.bz2 wayland-cb00e27039d3b1b4475150b2468066adb99984dc.tar.lz wayland-cb00e27039d3b1b4475150b2468066adb99984dc.tar.xz wayland-cb00e27039d3b1b4475150b2468066adb99984dc.tar.zst wayland-cb00e27039d3b1b4475150b2468066adb99984dc.zip | |
connection: Fix sendmsg() on FreeBSD
It expects ((msg_controllen == 0) == (msg_control == NULL)), and returns
EINVAL otherwise. It can't hurt to be tidy about things on other platforms
either though.
See: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=99356#c5
Signed-off-by: Philip Withnall <philip at tecnocode.co.uk>
Signed-off-by: Karsten Otto <ottoka at posteo.de>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Diffstat (limited to 'src/connection.c')
| -rw-r--r-- | src/connection.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/connection.c b/src/connection.c index c5daca6..f9f2474 100644 --- a/src/connection.c +++ b/src/connection.c @@ -290,7 +290,7 @@ wl_connection_flush(struct wl_connection *connection) msg.msg_namelen = 0; msg.msg_iov = iov; msg.msg_iovlen = count; - msg.msg_control = cmsg; + msg.msg_control = (clen > 0) ? cmsg : NULL; msg.msg_controllen = clen; msg.msg_flags = 0; |
