Skip to content

Commit

Permalink
lib: posix: Fix compile error with mqueue.h
Browse files Browse the repository at this point in the history
With newer newlib we get a build error with mqueue.h realted to mode_t.
Add some ifdef protection if mode_t is already defined and set
_MODE_T_DECLARED if we are the first to define it.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
  • Loading branch information
galak committed Feb 22, 2019
1 parent 77b22e4 commit 93254e1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/posix/mqueue.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ extern "C" {
#endif

typedef void *mqd_t;
#ifndef _MODE_T_DECLARED
typedef unsigned int mode_t;
#define _MODE_T_DECLARED
#endif

typedef struct mq_attr {
long mq_flags;
Expand Down

0 comments on commit 93254e1

Please sign in to comment.