From 296c055900f3bb3286703a0ebdd0bf0820efdda2 Mon Sep 17 00:00:00 2001 From: Peter Seiderer Date: Wed, 1 Nov 2023 10:07:28 +0100 Subject: [PATCH] iox-#2072 Include mqueue.h needs sys/stat.h for mode_t (fixes musl compile) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As stated in the mq_open man page ([1]) the mqueue.h include needs additional sys/stat.h include for mode_t definition. Fixes musl compile: In file included from .../build/iceoryx-custom/iceoryx_platform/linux/source/mqueue.cpp:17: .../build/iceoryx-custom/iceoryx_platform/linux/include/iceoryx_platform/mqueue.hpp:23:49: error: ‘mode_t’ has not been declared 23 | mqd_t iox_mq_open4(const char* name, int oflag, mode_t mode, struct mq_attr* attr); | ^~~~~~ .../build/iceoryx-custom/iceoryx_platform/linux/source/mqueue.cpp:26:49: error: ‘mode_t’ has not been declared 26 | mqd_t iox_mq_open4(const char* name, int oflag, mode_t mode, struct mq_attr* attr) | ^~~~~~ [1] https://man7.org/linux/man-pages/man3/mq_open.3.html Signed-off-by: Peter Seiderer --- doc/website/release-notes/iceoryx-unreleased.md | 1 + iceoryx_platform/linux/include/iceoryx_platform/mqueue.hpp | 1 + 2 files changed, 2 insertions(+) diff --git a/doc/website/release-notes/iceoryx-unreleased.md b/doc/website/release-notes/iceoryx-unreleased.md index b471c8fa54..e5d67f5288 100644 --- a/doc/website/release-notes/iceoryx-unreleased.md +++ b/doc/website/release-notes/iceoryx-unreleased.md @@ -98,6 +98,7 @@ - Remove `EXPECT_DEATH` [#1613](https://github.com/eclipse-iceoryx/iceoryx/issues/1613) - ServiceDiscovery uses instrospection MemPools [#1359](https://github.com/eclipse-iceoryx/iceoryx/issues/1359) - LockFreeQueue fails to support move-only types [\#2067](https://github.com/eclipse-iceoryx/iceoryx/issues/2067) +- Fix musl libc compile (missing sys/stat.h include in mqueue.h for mode_t definition) [\#2072](https://github.com/eclipse-iceoryx/iceoryx/issues/2072) **Refactoring:** diff --git a/iceoryx_platform/linux/include/iceoryx_platform/mqueue.hpp b/iceoryx_platform/linux/include/iceoryx_platform/mqueue.hpp index 65741d5afe..da9b9beb7d 100644 --- a/iceoryx_platform/linux/include/iceoryx_platform/mqueue.hpp +++ b/iceoryx_platform/linux/include/iceoryx_platform/mqueue.hpp @@ -18,6 +18,7 @@ #define IOX_HOOFS_LINUX_PLATFORM_MQUEUE_HPP #include +#include mqd_t iox_mq_open2(const char* name, int oflag); mqd_t iox_mq_open4(const char* name, int oflag, mode_t mode, struct mq_attr* attr);