diff --git a/include/posix/unistd.h b/include/posix/unistd.h index d25006a557d..fb1fe806b5c 100644 --- a/include/posix/unistd.h +++ b/include/posix/unistd.h @@ -21,7 +21,6 @@ extern "C" { #include /* File related operations */ -extern int open(const char *name, int flags); extern int close(int file); extern ssize_t write(int file, const void *buffer, size_t count); extern ssize_t read(int file, void *buffer, size_t count); diff --git a/lib/libc/minimal/include/fcntl.h b/lib/libc/minimal/include/fcntl.h index 23028f35239..caa79c91965 100644 --- a/lib/libc/minimal/include/fcntl.h +++ b/lib/libc/minimal/include/fcntl.h @@ -15,4 +15,6 @@ #define F_GETFL 3 #define F_SETFL 4 +int open(const char *name, int flags); + #endif /* ZEPHYR_LIB_LIBC_MINIMAL_INCLUDE_SYS_FCNTL_H_ */ diff --git a/tests/posix/common/src/mqueue.c b/tests/posix/common/src/mqueue.c index d7123ea64e6..c83f3751fbc 100644 --- a/tests/posix/common/src/mqueue.c +++ b/tests/posix/common/src/mqueue.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include diff --git a/tests/posix/fs/src/test_fs_dir.c b/tests/posix/fs/src/test_fs_dir.c index 46e4f0311f3..4b3d02ebe7c 100644 --- a/tests/posix/fs/src/test_fs_dir.c +++ b/tests/posix/fs/src/test_fs_dir.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include "test_fs.h" diff --git a/tests/posix/fs/src/test_fs_file.c b/tests/posix/fs/src/test_fs_file.c index 5b6036a2cc6..614f99ac47d 100644 --- a/tests/posix/fs/src/test_fs_file.c +++ b/tests/posix/fs/src/test_fs_file.c @@ -5,6 +5,7 @@ */ #include +#include #include #include "test_fs.h"