61
61
* part of the socket interface library. We avoid the more politically-
62
62
* correct uname() routine because that has no portable way of dealing
63
63
* with long (FQDN) hostnames.
66
74
if (gethostname(namebuf, sizeof(namebuf)) < 0)
67
75
msg_fatal("gethostname: %m");
68
76
namebuf[MAXHOSTNAMELEN] = 0;
69
78
if (valid_hostname(namebuf, DO_GRIPE) == 0)
70
79
msg_fatal("unable to use my own hostname");
71
81
my_host_name = mystrdup(namebuf);