From deb1694c3ce90c65d94e1c9e90561317e53256a2 Mon Sep 17 00:00:00 2001 From: Dominik Ermel Date: Fri, 3 Jul 2020 11:18:02 +0000 Subject: [PATCH] posix: Extend open() function signature with ellipsis The commit changes signature of open function from: int open(const char *name, int flags) to int open(const char *name, int flags, ...) Currently existing two argument invocations should not require any rework. Signed-off-by: Dominik Ermel --- lib/libc/minimal/include/fcntl.h | 2 +- lib/posix/fs.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libc/minimal/include/fcntl.h b/lib/libc/minimal/include/fcntl.h index caa79c91965..7737195b1c4 100644 --- a/lib/libc/minimal/include/fcntl.h +++ b/lib/libc/minimal/include/fcntl.h @@ -15,6 +15,6 @@ #define F_GETFL 3 #define F_SETFL 4 -int open(const char *name, int flags); +int open(const char *name, int flags, ...); #endif /* ZEPHYR_LIB_LIBC_MINIMAL_INCLUDE_SYS_FCNTL_H_ */ diff --git a/lib/posix/fs.c b/lib/posix/fs.c index 7cdbec4c992..d208d8b26a6 100644 --- a/lib/posix/fs.c +++ b/lib/posix/fs.c @@ -59,7 +59,7 @@ static inline void posix_fs_free_obj(struct posix_fs_desc *ptr) * * See IEEE 1003.1 */ -int open(const char *name, int flags) +int open(const char *name, int flags, ...) { int rc, fd; struct posix_fs_desc *ptr = NULL;