# All lines beginning with `# DP:' are a description of the patch. # DP: Description: Allow ldconfig to work on x86-64/i386 biarch systems --- sysdeps/unix/sysv/linux/x86_64/dl-cache.h | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) --- a/sysdeps/unix/sysv/linux/x86_64/dl-cache.h +++ b/sysdeps/unix/sysv/linux/x86_64/dl-cache.h @@ -22,4 +22,23 @@ #define _dl_cache_check_flags(flags) \ ((flags) == _DL_CACHE_DEFAULT_ID) -#include +#define add_system_dir(dir) \ + do \ + { \ + size_t len = strlen (dir); \ + char path[len + 3]; \ + memcpy (path, dir, len + 1); \ + if (len >= 6 && ! memcmp (path + len - 6, "/lib32", 6)) \ + { \ + len -= 2; \ + path[len] = '\0'; \ + } \ + add_dir (path); \ + if (len >= 4 && ! memcmp (path + len - 4, "/lib", 4)) \ + { \ + memcpy (path + len, "32", 3); \ + add_dir (path); \ + } \ + } while (0) + +#include