From 34306efeb261f8466ad427a61cdae3272b8bae4d Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Thu, 18 Mar 2021 10:46:55 +0000 Subject: [PATCH] Change wl_os_dupfd_cloexec minfd to be int The fcntl() argument is defined to be an int and not a long. This does not matter on most architectures since the value is passed in registers, but it causes issues on big-endian architectures that pass variadic arguments on the stack. Signed-off-by: Alex Richardson Reviewed-by: Simon Ser --- src/wayland-os.c | 2 +- src/wayland-os.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wayland-os.c b/src/wayland-os.c index 93b6f5f..1e4a23d 100644 --- a/src/wayland-os.c +++ b/src/wayland-os.c @@ -73,7 +73,7 @@ wl_os_socket_cloexec(int domain, int type, int protocol) } int -wl_os_dupfd_cloexec(int fd, long minfd) +wl_os_dupfd_cloexec(int fd, int minfd) { int newfd; diff --git a/src/wayland-os.h b/src/wayland-os.h index f51efaa..af37640 100644 --- a/src/wayland-os.h +++ b/src/wayland-os.h @@ -30,7 +30,7 @@ int wl_os_socket_cloexec(int domain, int type, int protocol); int -wl_os_dupfd_cloexec(int fd, long minfd); +wl_os_dupfd_cloexec(int fd, int minfd); ssize_t wl_os_recvmsg_cloexec(int sockfd, struct msghdr *msg, int flags); -- 2.7.4