mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-27 11:55:06 +00:00
b8ba871bd9
files, curses, db, regex etc that we already have). The other glue will follow shortly. Obtained from: Keith Bostic <bostic@bostic.com>
23 lines
382 B
C
23 lines
382 B
C
#include "config.h"
|
|
|
|
/*
|
|
* Solaris doesn't include the gethostname call by default.
|
|
*/
|
|
#include <sys/utsname.h>
|
|
#include <sys/systeminfo.h>
|
|
|
|
#include <netdb.h>
|
|
|
|
/*
|
|
* PUBLIC: #ifndef HAVE_GETHOSTNAME
|
|
* PUBLIC: int gethostname __P((char *, int));
|
|
* PUBLIC: #endif
|
|
*/
|
|
int
|
|
gethostname(host, len)
|
|
char *host;
|
|
int len;
|
|
{
|
|
return (sysinfo(SI_HOSTNAME, host, len) == -1 ? -1 : 0);
|
|
}
|