summaryrefslogtreecommitdiff
path: root/libc/inet/hostid.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/inet/hostid.c')
-rw-r--r--libc/inet/hostid.c2
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;