The header and the man page say that sethostid() returns void, so make the
definition match. Include <unistd.h>.
This commit is contained in:
parent
16ca32b39f
commit
442a7dde61
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=149940
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user