[Pkg-clamav-devel] Bug#755277: Additional information
Dudytz
dudytz at gmail.com
Sat Jul 19 13:55:44 UTC 2014
I made some tests:
My local configuration:
/etc/hostname:
myhostname
/etc/hosts:
1.1.1.1 myhostname.mydomain.com myhostname
Test code:
#include <stdio.h>
#include <unistd.h>
#include <netdb.h>
int main(void) {
char name[100 + 1];
struct hostent *fqdn;
gethostname(name, 100);
name[100] = 0;
fqdn = gethostbyname(name);
printf("Hostname..: %s\n", name);
printf("FQDN......: %s\n", fqdn->h_name);
return 0;
}
Output of the test code:
Hostname..: myhostname
FQDN......: myhostname.mydomain.com
More information about the Pkg-clamav-devel
mailing list