diff --git a/src/testlib/qtestcrashhandler_unix.cpp b/src/testlib/qtestcrashhandler_unix.cpp index 23ba8287d81..92ad16ceb97 100644 --- a/src/testlib/qtestcrashhandler_unix.cpp +++ b/src/testlib/qtestcrashhandler_unix.cpp @@ -21,12 +21,6 @@ #include #include -#if defined(Q_OS_LINUX) -#include -#include -#include -#endif - #include #if __has_include() # include @@ -41,16 +35,6 @@ # include # endif -# ifndef _PATH_DEFPATH -# define _PATH_DEFPATH "/usr/bin:/bin" -# endif -# ifndef SIGSTKSZ -# define SIGSTKSZ 0 /* we have code to set the minimum */ -# endif -# ifndef SA_RESETHAND -# define SA_RESETHAND 0 -# endif - #if defined(Q_OS_MACOS) #include #include @@ -59,12 +43,30 @@ #include #include #include + +#define CSR_ALLOW_UNRESTRICTED_FS (1 << 1) +#endif + +#if defined(Q_OS_LINUX) +#include +#include +#include #endif #if defined(Q_OS_WASM) #include #endif +#ifndef _PATH_DEFPATH +# define _PATH_DEFPATH "/usr/bin:/bin" +#endif +#ifndef SIGSTKSZ +# define SIGSTKSZ 0 /* we have code to set the minimum */ +#endif +#ifndef SA_RESETHAND +# define SA_RESETHAND 0 +#endif + QT_BEGIN_NAMESPACE using namespace Qt::StringLiterals; @@ -285,8 +287,7 @@ void prepareStackTrace() // where LLDB will hang and fail to provide a valid stack trace. # if defined(Q_PROCESSOR_ARM) return; - #else - #define CSR_ALLOW_UNRESTRICTED_FS (1 << 1) +# else std::optional sipConfiguration = qt_mac_sipConfiguration(); if (!sipConfiguration || !(*sipConfiguration & CSR_ALLOW_UNRESTRICTED_FS)) return;