Closed danmcd closed 1 week ago
This may be useful for OmniOS too, @citrus-it
Tested with checks that show error numbers are returned appropriate. a.out tests AF_UNIX, udp.out tests AF_INET6/SOCK_DGRAM:
# uname -a
Linux 93c0ec62-af01-4070-aacd-9e42a0410000 5 BrandZ virtual linux x86_64 GNU/Linux
# ./a.out ; ./udp.out
fd=3
ret=-1, errnor = 95 (Operation not supported)
fd=3
ret=-1, errno == 92 (Protocol not available)
#
Discovered by @smokris --> this patch improves the insufficient checking.