From c7774174beffe9a8d29dd4fb38bbed43ece1cecd Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Wed, 2 Aug 2017 13:21:59 +0200 Subject: swrap: Fix prototype of open[64] to prevent segfault on ppc64le The calling conventions for vaarg are different on ppc64le. The patch fixes segfaults on that platform. Thanks to Florian Weimer who helped debugging it! Signed-off-by: Andreas Schneider Reviewed-by: Stefan Metzmacher --- src/socket_wrapper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/socket_wrapper.c') diff --git a/src/socket_wrapper.c b/src/socket_wrapper.c index d95dbc0..ccbe67f 100644 --- a/src/socket_wrapper.c +++ b/src/socket_wrapper.c @@ -442,9 +442,9 @@ typedef int (*__libc_getsockopt)(int sockfd, socklen_t *optlen); typedef int (*__libc_ioctl)(int d, unsigned long int request, ...); typedef int (*__libc_listen)(int sockfd, int backlog); -typedef int (*__libc_open)(const char *pathname, int flags, mode_t mode); +typedef int (*__libc_open)(const char *pathname, int flags, ...); #ifdef HAVE_OPEN64 -typedef int (*__libc_open64)(const char *pathname, int flags, mode_t mode); +typedef int (*__libc_open64)(const char *pathname, int flags, ...); #endif /* HAVE_OPEN64 */ typedef int (*__libc_openat)(int dirfd, const char *path, int flags, ...); typedef int (*__libc_pipe)(int pipefd[2]); -- cgit