If gethostname() fails we call GetComputerNameEx with
ComputerNameDnsFullyQualified. This is wrong, gethostname should return
the hostname only, not the FQDN. Fix this by calling GetComputerNameEx
with ComputerNameDnsHostname.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>