From d1772e143249cac4643ef34d1a9c6835ea7b4e88 Mon Sep 17 00:00:00 2001 From: Javier Alonso Date: Mon, 9 Dec 2024 09:34:26 +0100 Subject: [PATCH] [POSIX][Bug] `mqueue.h`: Include file does not conform the standard The Open Group Base Specification IEEE Std 1003.1-2024 states that > The header shall define O_RDONLY, O_WRONLY, O_RDWR, > O_CREAT, O_EXCL, and O_NONBLOCK as described in . https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/mqueue.h.html It also states that: > The header shall define the struct timespec structure as described in . 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 header may make visible symbols defined > in the headers , , and . So having those includes shouldn't be an issue. --- include/mqueue.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/mqueue.h b/include/mqueue.h index 8fb6c4470b..3590e9a018 100644 --- a/include/mqueue.h +++ b/include/mqueue.h @@ -27,8 +27,10 @@ * Included Files ****************************************************************************/ +#include #include #include +#include /**************************************************************************** * Pre-processor Definitions