The header and the man page say that sethostid() returns void, so make the

definition match.  Include <unistd.h>.
This commit is contained in:
Stefan Farfeleder 2005-09-10 13:54:42 +00:00
parent 16ca32b39f
commit 442a7dde61
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=149940

View File

@ -40,14 +40,14 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/sysctl.h>
long
#include <unistd.h>
void
sethostid(long hostid)
{
int mib[2];
mib[0] = CTL_KERN;
mib[1] = KERN_HOSTID;
if (sysctl(mib, 2, NULL, NULL, &hostid, sizeof hostid) == -1)
return (-1);
return (0);
sysctl(mib, 2, NULL, NULL, &hostid, sizeof hostid);
}