mirror of
https://github.com/apache/nuttx.git
synced 2025-01-13 02:48:37 +08:00
[POSIX][Bug] mqueue.h
: Include file does not conform the standard
The Open Group Base Specification IEEE Std 1003.1-2024 states that > The <mqueue.h> header shall define O_RDONLY, O_WRONLY, O_RDWR, > O_CREAT, O_EXCL, and O_NONBLOCK as described in <fcntl.h>. https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/mqueue.h.html It also states that: > The <mqueue.h> header shall define the struct timespec structure as described in <time.h>. https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/mqueue.h.html The way the `mqueue.h` include file is defined right now violates the standard, having potentially different code depending on the platform the code is being compiled against - assuming a multi-arch POSIX environment. The standard also states that: > Inclusion of the <mqueue.h> header may make visible symbols defined > in the headers <fcntl.h>, <signal.h>, and <time.h>. So having those includes shouldn't be an issue.
This commit is contained in:
parent
0d0638ac98
commit
d1772e1432
1 changed files with 2 additions and 0 deletions
|
@ -27,8 +27,10 @@
|
|||
* Included Files
|
||||
****************************************************************************/
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <sys/types.h>
|
||||
#include <signal.h>
|
||||
#include <time.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
|
|
Loading…
Reference in a new issue