summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/gethostid.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-09-07 18:13:12 +0000
committerUlrich Drepper <drepper@redhat.com>2000-09-07 18:13:12 +0000
commite0baae12647612af5f12f0563a65f03514603359 (patch)
tree1e6dc0e8e3c8902c08b841ec949b8e9d666c1d63 /sysdeps/unix/sysv/linux/gethostid.c
parent377f6020361e5397fd44a6b092ed77f4568f0a41 (diff)
downloadglibc-e0baae12647612af5f12f0563a65f03514603359.tar.gz
glibc-e0baae12647612af5f12f0563a65f03514603359.tar.xz
glibc-e0baae12647612af5f12f0563a65f03514603359.zip
Update.
	* sysdeps/unix/sysv/linux/gethostid.c: Find hostid file in /etc.

	* sysdeps/mips/dl-machine.h (RESOLVE_GOTSYM): Fix calls to dl_lookup.
Diffstat (limited to 'sysdeps/unix/sysv/linux/gethostid.c')
-rw-r--r--sysdeps/unix/sysv/linux/gethostid.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/gethostid.c b/sysdeps/unix/sysv/linux/gethostid.c
index 6f501e391d..f51b3a2197 100644
--- a/sysdeps/unix/sysv/linux/gethostid.c
+++ b/sysdeps/unix/sysv/linux/gethostid.c
@@ -21,7 +21,8 @@
 #include <unistd.h>
 #include <netdb.h>
 
-#define HOSTIDFILE "/var/adm/hostid"
+#define HOSTIDFILE "/etc/hostid"
+#define OLD_HOSTIDFILE "/etc/hostid"
 
 #ifdef SET_PROCEDURE
 int
@@ -70,6 +71,8 @@ gethostid ()
 
   /* First try to get the ID from a former invocation of sethostid.  */
   fd = __open (HOSTIDFILE, O_RDONLY);
+  if (fd < 0)
+    fd = __open (OLD_HOSTIDFILE, O_RDONLY);
   if (fd >= 0)
     {
       ssize_t n = __read (fd, &id, sizeof (id));