posix: unistd.h: open() doesn't belong here

Per POSIX, open() is defined in <fcntl.h>. fcntl.h in turn comes from
the underlying libc, either newlib, or minimal libc.

Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
This commit is contained in:
Paul Sokolovsky 2019-06-04 23:14:22 +03:00 committed by Kumar Gala
parent 1347bf9b48
commit b7bb48eeac
5 changed files with 5 additions and 1 deletions

View file

@ -21,7 +21,6 @@ extern "C" {
#include <fs/fs.h>
/* 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);

View file

@ -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_ */

View file

@ -7,6 +7,7 @@
#include <ztest.h>
#include <zephyr.h>
#include <sys/printk.h>
#include <fcntl.h>
#include <mqueue.h>
#include <pthread.h>

View file

@ -5,6 +5,7 @@
*/
#include <stdio.h>
#include <fcntl.h>
#include <posix/unistd.h>
#include <posix/dirent.h>
#include "test_fs.h"

View file

@ -5,6 +5,7 @@
*/
#include <string.h>
#include <fcntl.h>
#include <posix/unistd.h>
#include "test_fs.h"