From 3aff1ff0c2ff0a0b2a3aab0ae4c547ac206200e9 Mon Sep 17 00:00:00 2001 From: Chris Friedt Date: Fri, 28 Oct 2022 13:51:06 -0400 Subject: [PATCH] posix: fs: avoid adding open() alias with newlib and picolibc Newlib and PicoLibc both already alias `open` to `_open`. Signed-off-by: Chris Friedt --- lib/posix/fs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/posix/fs.c b/lib/posix/fs.c index f0cd51d0d96..bc48ee7fbc6 100644 --- a/lib/posix/fs.c +++ b/lib/posix/fs.c @@ -123,7 +123,9 @@ int open(const char *name, int flags, ...) return fd; } +#if !defined(CONFIG_NEWLIB_LIBC) && !defined(CONFIG_PICOLIBC) FUNC_ALIAS(open, _open, int); +#endif static int fs_close_vmeth(void *obj) {