From 9b880a6b4112b0b3c0bd07949f7836daeea4e712 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Tue, 27 May 2014 00:11:37 -0400 Subject: [PATCH] fix sys_open macro for archs without the plain open syscall --- src/internal/syscall.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/internal/syscall.h b/src/internal/syscall.h index b6b39aec..08a85784 100644 --- a/src/internal/syscall.h +++ b/src/internal/syscall.h @@ -192,10 +192,10 @@ long __syscall_ret(unsigned long), __syscall(syscall_arg_t, ...), #define __sys_open_cp2(x,pn,fl) __syscall_cp2(SYS_open, pn, (fl)|O_LARGEFILE) #define __sys_open_cp3(x,pn,fl,mo) __syscall_cp3(SYS_open, pn, (fl)|O_LARGEFILE, mo) #else -#define __sys_open2(x,pn,fl) __syscall2(SYS_openat, AT_FDCWD, pn, (fl)|O_LARGEFILE) -#define __sys_open3(x,pn,fl,mo) __syscall3(SYS_openat, AT_FDCWD, pn, (fl)|O_LARGEFILE, mo) -#define __sys_open_cp2(x,pn,fl) __syscall_cp2(SYS_openat, AT_FDCWD, pn, (fl)|O_LARGEFILE) -#define __sys_open_cp3(x,pn,fl,mo) __syscall_cp3(SYS_openat, AT_FDCWD, pn, (fl)|O_LARGEFILE, mo) +#define __sys_open2(x,pn,fl) __syscall3(SYS_openat, AT_FDCWD, pn, (fl)|O_LARGEFILE) +#define __sys_open3(x,pn,fl,mo) __syscall4(SYS_openat, AT_FDCWD, pn, (fl)|O_LARGEFILE, mo) +#define __sys_open_cp2(x,pn,fl) __syscall_cp3(SYS_openat, AT_FDCWD, pn, (fl)|O_LARGEFILE) +#define __sys_open_cp3(x,pn,fl,mo) __syscall_cp4(SYS_openat, AT_FDCWD, pn, (fl)|O_LARGEFILE, mo) #endif #define __sys_open(...) __SYSCALL_DISP(__sys_open,,__VA_ARGS__) -- 2.25.1