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>
This commit is contained in:
Tasuku Suzuki 2019-07-11 03:26:41 +09:00
parent 1ae39cc72b
commit 99749d3b05
3 changed files with 19 additions and 3 deletions

View File

@ -1905,8 +1905,11 @@ defineTest(qtConfCreateReportRecurse) {
entry = $${1}.$$n entry = $${1}.$$n
subKeys = $$eval($${entry}._KEYS_) subKeys = $$eval($${entry}._KEYS_)
contains(subKeys, condition) { contains(subKeys, condition) {
condition = $$eval($${entry}.condition) r = true
r = $$qtConfEvaluate($$condition) for (condition, $$qtConfScalarOrList($${entry}.condition)) {
r = $$qtConfEvaluate($$condition)
!$$r: break()
}
!qtConfIsBoolean($$r): \ !qtConfIsBoolean($$r): \
error("Evaluation of condition '$$condition' in report entry $${entry} yielded non-boolean value '$$r'.") error("Evaluation of condition '$$condition' in report entry $${entry} yielded non-boolean value '$$r'.")
!$$r: next() !$$r: next()

View File

@ -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. "message": "detected a std::atomic implementation that fails for function pointers.
Please apply the patch corresponding to your Standard Library vendor, found in Please apply the patch corresponding to your Standard Library vendor, found in
qtbase/config.tests/atomicfptr" 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"
} }
], ],

View File

@ -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); return ::ppoll(fds, nfds, timeout_ts, nullptr);
#elif QT_CONFIG(poll_poll) #elif QT_CONFIG(poll_poll)
return ::poll(fds, nfds, timespecToMillisecs(timeout_ts)); return ::poll(fds, nfds, timespecToMillisecs(timeout_ts));
#else #elif QT_CONFIG(poll_select)
return qt_poll(fds, nfds, timeout_ts); return qt_poll(fds, nfds, timeout_ts);
#else
// configure.json reports an error when everything is not available
#endif #endif
} }