summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/gethostid.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/gethostid.c')
-rw-r--r--sysdeps/unix/sysv/linux/gethostid.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sysdeps/unix/sysv/linux/gethostid.c b/sysdeps/unix/sysv/linux/gethostid.c
index f51b3a2197..f19d515abd 100644
--- a/sysdeps/unix/sysv/linux/gethostid.c
+++ b/sysdeps/unix/sysv/linux/gethostid.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1998, 1999, 2000 Free Software Foundation, Inc.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -40,7 +40,7 @@ sethostid (id)
}
/* Open file for writing. Everybody is allowed to read this file. */
- fd = __open (HOSTIDFILE, O_CREAT|O_WRONLY, 0644);
+ fd = __open (HOSTIDFILE, O_CREAT|O_WRONLY|O_TRUNC, 0644);
if (fd < 0)
return -1;