Utils: Fix MinGW build

Amends a0f6e8dc04

The issue is that pthread.h is including <process.h>, which ends up to
utils/process.h since it's first in path.

Change-Id: I525384083b6952aded4b77c29d00d85f084c60f9
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
Cristian Adam
2023-05-04 15:07:18 +02:00
parent 34ad405d76
commit 13dd678834
3 changed files with 9 additions and 1 deletions

View File

@@ -1,7 +1,11 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#pragma once
#if defined(Q_CC_MINGW) && defined(WIN_PTHREADS_H) && !defined(_INC_PROCESS)
// Arrived here via <pthread.h> which wants to include <process.h>
#include_next <process.h>
#elif !defined(UTILS_PROCESS_H)
#define UTILS_PROCESS_H
#include "utils_global.h"
@@ -217,3 +221,5 @@ public:
} // namespace Utils
QTC_DECLARE_CUSTOM_TASK(ProcessTask, Utils::ProcessTaskAdapter);
#endif // UTILS_PROCESS_H