diff --git a/src/corelib/CMakeLists.txt b/src/corelib/CMakeLists.txt index daf98e929a..c9e788054f 100644 --- a/src/corelib/CMakeLists.txt +++ b/src/corelib/CMakeLists.txt @@ -1000,7 +1000,7 @@ qt_internal_extend_target(Core CONDITION QT_FEATURE_filesystemiterator AND WIN32 qt_internal_extend_target(Core CONDITION QT_FEATURE_process AND UNIX SOURCES ../3rdparty/forkfd/forkfd.h - io/forkfd_qt.cpp + io/forkfd_qt.c INCLUDE_DIRECTORIES ../3rdparty/forkfd ) diff --git a/src/corelib/io/forkfd_qt.cpp b/src/corelib/io/forkfd_qt.c similarity index 87% rename from src/corelib/io/forkfd_qt.cpp rename to src/corelib/io/forkfd_qt.c index 3c6d05d6a8..7107b2c6a0 100644 --- a/src/corelib/io/forkfd_qt.cpp +++ b/src/corelib/io/forkfd_qt.c @@ -1,6 +1,9 @@ // Copyright (C) 2016 Intel Corporation. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only +#ifndef _GNU_SOURCE +# define _GNU_SOURCE +#endif #include #define FORKFD_NO_SPAWNFD