This was just fixed in OmniOS, see https://github.com/omniosorg/omnios-extra/blob/master/build/minidlna/patches/select_use_after_free.patch
6 argument gethostbyname_r test is too generic