https://bugs.winehq.org/show_bug.cgi?id=40865
--- Comment #10 from Henri Verbeet hverbeet@gmail.com --- (In reply to Bruno Jesus from comment #9)
The check for gethostbyname_r is at line 2200, the test succeeds BUT must not (as the function is not declared in netdb.h), as the #define name implies HAVE_LINUX_GETHOSTBYNAME_R_6 must be LINUX only.
What about putting a #ifdef __linux__ in the test source?
You'd want something like __GLIBC__ since it's more of a glibc feature than a Linux feature, but I think the right approach would be to just use getaddrinfo()/getnameinfo() instead of gethostbyname_r()/gethostbyaddr_r().