From 6278781655261a5011376b2fa2600996e32ca889 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Fri, 6 Apr 2001 20:28:45 +0000 Subject: Fix include/errno.h to not use kernel header, and instead use bits/errno.h. This required we use _LIBC instead of __LIBC__ to be consistent with glibc. This had some sideffects in sys/syscalls.h. While fixing things, I made everything use __set_errno() for (eventual) thread support. -Erik --- libc/inet/hostid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libc/inet/hostid.c') diff --git a/libc/inet/hostid.c b/libc/inet/hostid.c index 84a441acf..0873aa4fc 100644 --- a/libc/inet/hostid.c +++ b/libc/inet/hostid.c @@ -17,7 +17,7 @@ int sethostid(long int new_id) int fd; int ret; - if (geteuid() || getuid()) return errno=EPERM; + if (geteuid() || getuid()) return __set_errno(EPERM); if ((fd=open(HOSTID,O_CREAT|O_WRONLY,0644))<0) return -1; ret = write(fd,(void *)&new_id,sizeof(new_id)) == sizeof(new_id) ? 0 : -1; -- cgit v1.2.3