aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2017-08-02 13:21:59 +0200
committerAndreas Schneider <asn@samba.org>2017-09-07 07:57:25 +0200
commitc7774174beffe9a8d29dd4fb38bbed43ece1cecd (patch)
treec22b75306f7c39b8556122b445cd6e9fb6d39603 /src
parent753f3872370a076628c272612da51963f4996ca4 (diff)
downloadsocket_wrapper-c7774174beffe9a8d29dd4fb38bbed43ece1cecd.tar.gz
socket_wrapper-c7774174beffe9a8d29dd4fb38bbed43ece1cecd.tar.xz
socket_wrapper-c7774174beffe9a8d29dd4fb38bbed43ece1cecd.zip
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 <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'src')
-rw-r--r--src/socket_wrapper.c4
1 files changed, 2 insertions, 2 deletions
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]);