summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTasuku Suzuki <tasuku.suzuki@qbc.io>2019-07-11 03:26:41 +0900
committerTasuku Suzuki <tasuku.suzuki@qbc.io>2019-08-18 13:22:35 +0900
commit99749d3b05326f139656e1393cbb227e967b4c54 (patch)
treedec36079d1a4bbe3880a4371a221eefd24a38399
parent1ae39cc72b7840b383aabbb5fd89fcfa3483d68c (diff)
Fix build without features.poll_{ppoll,pollts,poll,select}
Change-Id: Idc87521cdf713682ed07eb28b3d3f2f3ca0675ce Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
-rw-r--r--mkspecs/features/qt_configure.prf7
-rw-r--r--src/corelib/configure.json11
-rw-r--r--src/corelib/kernel/qcore_unix.cpp4
3 files changed, 19 insertions, 3 deletions
diff --git a/mkspecs/features/qt_configure.prf b/mkspecs/features/qt_configure.prf
index 2ac9de266f..2b86caebd0 100644
--- a/mkspecs/features/qt_configure.prf
+++ b/mkspecs/features/qt_configure.prf
@@ -1905,8 +1905,11 @@ defineTest(qtConfCreateReportRecurse) {
entry = $${1}.$$n
subKeys = $$eval($${entry}._KEYS_)
contains(subKeys, condition) {
- condition = $$eval($${entry}.condition)
- r = $$qtConfEvaluate($$condition)
+ r = true
+ for (condition, $$qtConfScalarOrList($${entry}.condition)) {
+ r = $$qtConfEvaluate($$condition)
+ !$$r: break()
+ }
!qtConfIsBoolean($$r): \
error("Evaluation of condition '$$condition' in report entry $${entry} yielded non-boolean value '$$r'.")
!$$r: next()
diff --git a/src/corelib/configure.json b/src/corelib/configure.json
index b2f032a667..ac6396de00 100644
--- a/src/corelib/configure.json
+++ b/src/corelib/configure.json
@@ -1116,6 +1116,17 @@ You need to use libdouble-conversion for double/string conversion."
"message": "detected a std::atomic implementation that fails for function pointers.
Please apply the patch corresponding to your Standard Library vendor, found in
qtbase/config.tests/atomicfptr"
+ },
+ {
+ "type": "error",
+ "condition": [
+ "config.unix || config.integrity",
+ "!features.poll_ppoll",
+ "!features.poll_pollts",
+ "!features.poll_poll",
+ "!features.poll_select"
+ ],
+ "message": "Qt requires poll(), ppoll(), poll_ts() or select() on this platform"
}
],
diff --git a/src/corelib/kernel/qcore_unix.cpp b/src/corelib/kernel/qcore_unix.cpp
index 18c031f137..ff0c957770 100644
--- a/src/corelib/kernel/qcore_unix.cpp
+++ b/src/corelib/kernel/qcore_unix.cpp
@@ -132,8 +132,10 @@ static inline int qt_ppoll(struct pollfd *fds, nfds_t nfds, const struct timespe
return ::ppoll(fds, nfds, timeout_ts, nullptr);
#elif QT_CONFIG(poll_poll)
return ::poll(fds, nfds, timespecToMillisecs(timeout_ts));
-#else
+#elif QT_CONFIG(poll_select)
return qt_poll(fds, nfds, timeout_ts);
+#else
+ // configure.json reports an error when everything is not available
#endif
}