Issue 7 of posix removed
gethostbyname, so I can no longer do
gethostbyname("my_hostname") to get canonical hostname for my machine. I've tried to use
getnameinfo instead, but given
127.0.0.1 localhost 127.0.0.1 my_hostname.fqdn my_hostname
I'm getting back
localhost (which makes sense). However
gethostbyname("my_hostname") does return
my_hostname.fqdn (at least both under musl and glibc).
Is there a reasonable replacement for my use case in issue 7 or am I out of luck on this one?