diff options
author | Eric Andersen <andersen@codepoet.org> | 2001-04-06 20:28:45 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2001-04-06 20:28:45 +0000 |
commit | 6278781655261a5011376b2fa2600996e32ca889 (patch) | |
tree | 11783e71b36c8c546c4dc02dff355b0f2478978b /libc/inet/hostid.c | |
parent | a704ccaa5232184844cd67315951b39f85a6ba04 (diff) |
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
Diffstat (limited to 'libc/inet/hostid.c')
-rw-r--r-- | libc/inet/hostid.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |