diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2024-03-25 13:42:21 -0400 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@gmx.de> | 2024-04-10 06:23:46 +0000 |
commit | 05408055d52f3fe014fef3c550820011fa8b89f7 (patch) | |
tree | 6b4a3cf27a1ef9aa0ae9763787a567b3d38d7a26 /src/corelib/io | |
parent | aa896ca9f51252b6d01766e19a03e41bd49857f3 (diff) |
QProcess: build forkfd as C code
forkfd_qt.cpp was originally created so we could use the Qt atomic
classes back when we couldn't rely on C11. We now can, so that primary
reason is gone. We only need it now to set NDEBUG, which the Qt build
doesn't set by default, and _GNU_SOURCE to match forkfd.c itself (GCC
and Clang define it by default in C++ mode because libstdc++ apparently
needs that).
Amends 993db5a12227b1e4067714ddc626d64a14474a54 and thus avoids a new
Clang 18 warning about using VLAs in C++ code:
forkfd_linux.c:160:50: error: variable length arrays in C++ are a Clang extension [-Werror,-Wvla-cxx-extension]
Pick-to: 6.7 6.6
Change-Id: I5f663c2f9f4149af84fefffd17bed82d39be4d78
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/corelib/io')
-rw-r--r-- | src/corelib/io/forkfd_qt.c (renamed from src/corelib/io/forkfd_qt.cpp) | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/corelib/io/forkfd_qt.cpp b/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 <QtCore/qglobal.h> #define FORKFD_NO_SPAWNFD |