From: Alex Richardson Date: Thu, 18 Mar 2021 10:46:55 +0000 (+0000) Subject: Change wl_os_dupfd_cloexec minfd to be int X-Git-Tag: 1.19.91~72 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=34306efeb261f8466ad427a61cdae3272b8bae4d;p=platform%2Fupstream%2Fwayland.git 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 --- 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);