From 21504ec27ae246eecc0bdf65504dec82258d74ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Fri, 15 Nov 2024 16:51:09 +0200 Subject: [PATCH] IPC: Add missing includes of errno.h These files use errno constants such as EACCES, while relying on this header to be included implicitly. If building with the latest libc++ versions, configured with _LIBCPP_REMOVE_TRANSITIVE_INCLUDES=1 (which removes unnecessary transitive includes from the public headers), one runs into this error, where errno.h no longer is implicitly included through other headers. Prior to 762017f03ca530937dfe24cc822065e08111f985, these functions were in separate files that explicitly did include errno.h. Change-Id: I7b02f2ffa35b86606f6c173bf6a6d2917dbdc151 Reviewed-by: Thiago Macieira Reviewed-by: Giuseppe D'Angelo (cherry picked from commit 9f429468326e3d857c84276c4acb86d2e8e83279) Reviewed-by: Qt Cherry-pick Bot --- src/corelib/ipc/qsharedmemory.cpp | 1 + src/corelib/ipc/qsystemsemaphore.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/src/corelib/ipc/qsharedmemory.cpp b/src/corelib/ipc/qsharedmemory.cpp index 02761c0263..e1ce735f89 100644 --- a/src/corelib/ipc/qsharedmemory.cpp +++ b/src/corelib/ipc/qsharedmemory.cpp @@ -12,6 +12,7 @@ #ifdef Q_OS_WIN # include #endif +#include #ifndef MAX_PATH # define MAX_PATH PATH_MAX diff --git a/src/corelib/ipc/qsystemsemaphore.cpp b/src/corelib/ipc/qsystemsemaphore.cpp index 4c24ef6043..24f4789f97 100644 --- a/src/corelib/ipc/qsystemsemaphore.cpp +++ b/src/corelib/ipc/qsystemsemaphore.cpp @@ -6,6 +6,7 @@ #if QT_CONFIG(systemsemaphore) #include +#include QT_BEGIN_NAMESPACE