diff options
Diffstat (limited to 'sysdeps/generic/dl-cache.c')
-rw-r--r-- | sysdeps/generic/dl-cache.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sysdeps/generic/dl-cache.c b/sysdeps/generic/dl-cache.c index ac4ee5e6c9..09cb857506 100644 --- a/sysdeps/generic/dl-cache.c +++ b/sysdeps/generic/dl-cache.c @@ -1,5 +1,5 @@ /* Support for reading /etc/ld.so.cache files written by Linux ldconfig. - Copyright (C) 1996 Free Software Foundation, Inc. + Copyright (C) 1996, 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -27,6 +27,10 @@ extern void *_dl_sysdep_read_whole_file (const char *filename, size_t *filesize_ptr, int mmap_prot); +#ifndef LD_SO_CACHE +#define LD_SO_CACHE "/etc/ld.so.cache" +#endif + #define CACHEMAGIC "ld.so-1.7.0" struct cache_file @@ -57,7 +61,7 @@ _dl_load_cache_lookup (const char *name) if (cache == NULL) { /* Read the contents of the file. */ - void *file = _dl_sysdep_read_whole_file ("/etc/ld.so.cache", &cachesize, + void *file = _dl_sysdep_read_whole_file (LD_SO_CACHE, &cachesize, PROT_READ); if (file && cachesize > sizeof *cache && !memcmp (file, CACHEMAGIC, sizeof CACHEMAGIC - 1)) |