diff options
author | Davide Beatrici <davidebeatrici@gmail.com> | 2019-04-06 08:01:11 +0200 |
---|---|---|
committer | Davide Beatrici <davidebeatrici@gmail.com> | 2019-04-06 17:30:27 +0000 |
commit | e199710d0ea804e4481042f41b91b5234540f5d5 (patch) | |
tree | dfa4acf2a13dace599b09107fd49679b62eea6ca /tests | |
parent | 8eeb5150ed99914e252a84f1637f179e3de04659 (diff) |
QHostInfo: use dlsym() with RTLD_DEFAULT in case libs cannot be loaded
The current code only tries to load the required functions from
LIBRESOLV_SO (if defined) and resolv, but on FreeBSD they are in libc:
https://www.freebsd.org/cgi/man.cgi?query=res_query&sektion=3&apropos=0&manpath=freebsd
This commit changes the code so that, after failing to load the
non-existent libraries, it attempts to load the functions with dlsym()
using the special handle RTLD_DEFAULT, which searches for the specified
symbol in the loaded libraries.
This is a follow-up to 8eeb5150ed99914e252a84f1637f179e3de04659.
Change-Id: I19d90b0ca8703398bf4f5f4edd5ae31e346ef251
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions