aboutsummaryrefslogtreecommitdiff
path: root/elf/ldconfig.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-09-24 16:13:15 +0000
committerUlrich Drepper <drepper@redhat.com>2000-09-24 16:13:15 +0000
commit7c3002f02a2bc5a93d1e034164871d8be951d6a9 (patch)
tree143ba4162570c51ad1bb9b78603279a2959c5370 /elf/ldconfig.c
parent37d31d75d46a7fb92bf46a93fe3a195a55c2716c (diff)
downloadglibc-7c3002f02a2bc5a93d1e034164871d8be951d6a9.zip
glibc-7c3002f02a2bc5a93d1e034164871d8be951d6a9.tar.gz
glibc-7c3002f02a2bc5a93d1e034164871d8be951d6a9.tar.bz2
Update.
2000-09-24 Ulrich Drepper <drepper@redhat.com> * elf/ldconfig.c (search_dir): Make more use of d_type information. 2000-09-23 Ulrich Drepper <drepper@redhat.com> * stdio-common/printf-parse.h (parse_one_spec): Clear spec->info.i18n. Patch by Joseph S. Myers <jsm28@cam.ac.uk>.
Diffstat (limited to 'elf/ldconfig.c')
-rw-r--r--elf/ldconfig.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/elf/ldconfig.c b/elf/ldconfig.c
index 99fe8a9..50b6a26 100644
--- a/elf/ldconfig.c
+++ b/elf/ldconfig.c
@@ -558,12 +558,18 @@ search_dir (const struct dir_entry *entry)
entry->path, direntry->d_name);
continue;
}
- if (lstat (buf, &stat_buf))
- {
- error (0, errno, _("Can't lstat %s"), buf);
- continue;
- }
- else if (S_ISDIR (stat_buf.st_mode) && is_hwcap (direntry->d_name))
+#ifdef _DIRENT_HAVE_D_TYPE
+ if (direntry->d_type != DT_UNKNOWN)
+ stat_buf.st_mode = DTTOIF (direntry->d_type);
+ else
+#endif
+ if (lstat (buf, &stat_buf))
+ {
+ error (0, errno, _("Can't lstat %s"), buf);
+ continue;
+ }
+
+ if (S_ISDIR (stat_buf.st_mode) && is_hwcap (direntry->d_name))
{
/* Handle subdirectory also, make a recursive call. */
struct dir_entry new_entry;