I'd like to have reopened this previous issue as it is still very much the case.
I believe as well that the common distros (I can easily verify OpenIndiana and OmniOS) patch it out (patch file attached).
Upstream/oracle/userland-gate seems to as well.
It is time to retire this check, or at least take into consideration the parametrization from unistd.h:
#if defined(_XPG4_2)
extern int gethostname(char *, size_t);
#elif !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
extern int gethostname(char *, int);
#endif |