summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorstefanf <stefanf@FreeBSD.org>2005-09-10 13:54:42 +0000
committerstefanf <stefanf@FreeBSD.org>2005-09-10 13:54:42 +0000
commitce921f2c55b557fa46c9b3937a56f1780d20d7df (patch)
treeb234dcdd142b02e459f4134b9844aabcdf3fefe0 /lib
parent30206fef60f119ab2b805244bd15c318f2b9e046 (diff)
downloadFreeBSD-src-ce921f2c55b557fa46c9b3937a56f1780d20d7df.zip
FreeBSD-src-ce921f2c55b557fa46c9b3937a56f1780d20d7df.tar.gz
The header and the man page say that sethostid() returns void, so make the
definition match. Include <unistd.h>.
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/compat-43/sethostid.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libc/compat-43/sethostid.c b/lib/libc/compat-43/sethostid.c
index 55ad658..33f0ccf 100644
--- a/lib/libc/compat-43/sethostid.c
+++ b/lib/libc/compat-43/sethostid.c
@@ -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);
}
OpenPOWER on IntegriCloud