mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2026-04-11 08:21:29 -04:00
connection: properly use sendmsg(2) and recvmsg(2)
- Properly align cmsg as per man:cmsg(3). - Use ssize_t to hold the return value of sendmsg(2) and recvmsg(2). - Avoid casting the return value of CMSG_DATA as per man:cmsg(3). Signed-off-by: Demi Marie Obenour <demi@invisiblethingslab.com>
This commit is contained in:
parent
9cb3d7aa9d
commit
b9d8c43d30
2 changed files with 34 additions and 16 deletions
|
|
@ -32,6 +32,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#define WL_HIDE_DEPRECATED 1
|
||||
|
||||
|
|
@ -133,13 +134,13 @@ wl_connection_copy(struct wl_connection *connection, void *data, size_t size);
|
|||
void
|
||||
wl_connection_consume(struct wl_connection *connection, size_t size);
|
||||
|
||||
int
|
||||
ssize_t
|
||||
wl_connection_flush(struct wl_connection *connection);
|
||||
|
||||
uint32_t
|
||||
wl_connection_pending_input(struct wl_connection *connection);
|
||||
|
||||
int
|
||||
ssize_t
|
||||
wl_connection_read(struct wl_connection *connection);
|
||||
|
||||
int
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue