lib: posix: Fix compile error with mqueue.h
With newer newlib we get a build error with mqueue.h realted to mode_t. Let's just let newlib define mode_t and have minimal libc also define it in sys/types.h. So we remove the duplicated definition in posix/unistd.h. Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
parent
dc39a9adcf
commit
6cc5722a61
|
@ -17,7 +17,6 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
typedef void *mqd_t;
|
||||
typedef unsigned int mode_t;
|
||||
|
||||
typedef struct mq_attr {
|
||||
long mq_flags;
|
||||
|
|
|
@ -16,11 +16,6 @@ extern "C" {
|
|||
#ifdef CONFIG_POSIX_API
|
||||
#include <fs.h>
|
||||
|
||||
#ifndef _MODE_T_DECLARED
|
||||
typedef unsigned int mode_t;
|
||||
#define _MODE_T_DECLARED
|
||||
#endif
|
||||
|
||||
/* File related operations */
|
||||
extern int open(const char *name, int flags);
|
||||
extern int close(int file);
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
#ifndef ZEPHYR_LIB_LIBC_MINIMAL_INCLUDE_SYS_TYPES_H_
|
||||
#define ZEPHYR_LIB_LIBC_MINIMAL_INCLUDE_SYS_TYPES_H_
|
||||
|
||||
typedef unsigned int mode_t;
|
||||
|
||||
#if !defined(__ssize_t_defined)
|
||||
#define __ssize_t_defined
|
||||
|
||||
|
|
Loading…
Reference in a new issue