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:
parent
1347bf9b48
commit
b7bb48eeac
|
@ -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);
|
||||
|
|
|
@ -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_ */
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include <ztest.h>
|
||||
#include <zephyr.h>
|
||||
#include <sys/printk.h>
|
||||
#include <fcntl.h>
|
||||
#include <mqueue.h>
|
||||
#include <pthread.h>
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <fcntl.h>
|
||||
#include <posix/unistd.h>
|
||||
#include <posix/dirent.h>
|
||||
#include "test_fs.h"
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include <fcntl.h>
|
||||
#include <posix/unistd.h>
|
||||
#include "test_fs.h"
|
||||
|
||||
|
|
Loading…
Reference in a new issue