Skip to content

Commit

Permalink
IPC: Add missing includes of errno.h
Browse files Browse the repository at this point in the history
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 762017f, these functions
were in separate files that explicitly did include errno.h.

Change-Id: I7b02f2ffa35b86606f6c173bf6a6d2917dbdc151
Reviewed-by: Thiago Macieira <[email protected]>
Reviewed-by: Giuseppe D'Angelo <[email protected]>
(cherry picked from commit 9f42946)
Reviewed-by: Qt Cherry-pick Bot <[email protected]>
  • Loading branch information
mstorsjo authored and Qt Cherry-pick Bot committed Nov 16, 2024
1 parent e2ba5d9 commit 21504ec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/corelib/ipc/qsharedmemory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#ifdef Q_OS_WIN
# include <qt_windows.h>
#endif
#include <errno.h>

#ifndef MAX_PATH
# define MAX_PATH PATH_MAX
Expand Down
1 change: 1 addition & 0 deletions src/corelib/ipc/qsystemsemaphore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#if QT_CONFIG(systemsemaphore)
#include <QtCore/q20memory.h>
#include <errno.h>

QT_BEGIN_NAMESPACE

Expand Down

0 comments on commit 21504ec

Please sign in to comment.