Bootstrap: explicitly include stdlib.h to check for __GLIBC_PREREQ

Previously the code was relying on the includes in qglobal.h, but now
when we try to get rid of qglobal.h we can end up in a situation when
qconfig-bootstrap.h was first included before qglobal.h (__GLIBC_PREREQ
not defined), and also included once again after qglobal.h
(__GLIBC_PREREQ defined, at least on linux). This resulted in
redefenition of Qt features dependent on __GLIBC_PREREQ.

This patch fixes it by explicitly including the stdlib.h header which
will provide __GLIBC_PREREQ definition when it is available.

Task-number: QTBUG-107046
Change-Id: Idbf7a11151c5f81723131daf25c06ef454ff5cbb
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This commit is contained in:
Ivan Solovev 2022-10-05 18:34:26 +02:00
parent 91b85ec868
commit f03f830e71

View File

@ -23,6 +23,8 @@
#ifdef QT_BOOTSTRAPPED
#include <stdlib.h> // for __GLIBC_PREREQ
#ifndef QT_NO_EXCEPTIONS
#define QT_NO_EXCEPTIONS
#endif