small mistake in previous patch
[nvi.git] / clib / gethostname.c
blob5b8e85acf9f2bf5d921091096518f6f09b770807
1 #include "config.h"
3 /*
4 * Solaris doesn't include the gethostname call by default.
5 */
6 #include <sys/utsname.h>
7 #include <sys/systeminfo.h>
9 #include <netdb.h>
12 * PUBLIC: #ifndef HAVE_GETHOSTNAME
13 * PUBLIC: int gethostname __P((char *, int));
14 * PUBLIC: #endif
16 int
17 gethostname(host, len)
18 char *host;
19 int len;
21 return (sysinfo(SI_HOSTNAME, host, len) == -1 ? -1 : 0);