Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.6.1
-
None
-
759647636 (dev), 79d32d5b0 (6.7), 3d53016d1 (6.6)
Description
The file FindWrapResolv.cmake (qtbase/cmake and lib/cmake/Qt6/ and copied to the installation directory) is used to test for the availability of the LIBRESOLV libraries.
To probe the following code fragment is used:
int main(int, char **argv) { res_state statep; int n = res_nmkquery(statep, 0, argv[1], 0, 0, NULL, 0, NULL, NULL, 0); n = res_nsend(statep, NULL, 0, NULL, 0); n = dn_expand(NULL, NULL, NULL, NULL, 0); return n; }
The culprit is the declaration: res_state statep;
In the next line it is passed into req_nmkquery. The compiler complains (error) because statep is used without being initialised.
Consequently, the test fails. The net effect is that the full QNetwork module is set to "not found".
The remedy is simple: initialise with statep = nullptr;
This solves the whole issue.
Attachments
For Gerrit Dashboard: QTBUG-120141 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
525740,3 | Fix FindWrapResolv on systems that complaing about uninit vars | dev | qt/qtbase | Status: MERGED | +2 | 0 |
526054,2 | Fix FindWrapResolv on systems that complaing about uninit vars | 6.7 | qt/qtbase | Status: MERGED | +2 | 0 |
526083,2 | Fix FindWrapResolv on systems that complaing about uninit vars | 6.6 | qt/qtbase | Status: MERGED | +2 | 0 |