Expand PMF_FN_* macros.
[netbsd-mini2440.git] / dist / nvi / clib / gethostname.c
blobdc16b492e332f10c814442d7546e541fbb05e88f
1 /* $NetBSD$ */
3 #include "config.h"
5 /*
6 * Solaris doesn't include the gethostname call by default.
7 */
8 #include <sys/utsname.h>
9 #include <sys/systeminfo.h>
11 #include <netdb.h>
14 * PUBLIC: #ifndef HAVE_GETHOSTNAME
15 * PUBLIC: int gethostname __P((char *, int));
16 * PUBLIC: #endif
18 int
19 gethostname(host, len)
20 char *host;
21 int len;
23 return (sysinfo(SI_HOSTNAME, host, len) == -1 ? -1 : 0);