You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

78 lines
2.1 KiB

# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../uclibc/ldconfig-glob.patch
# Copyright (C) 2006 The OpenSDE Project
# Copyright (C) 2004 - 2006 The T2 SDE Project
#
# More information can be found in the files COPYING and README.
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# --- SDE-COPYRIGHT-NOTE-END ---
Add pathname pattern matching to ldconfig
-- Michael Tross
diff -ur uClibc-r11027/utils/ldconfig.c uClibc-r11027.work/utils/ldconfig.c
--- uClibc-r11027/utils/ldconfig.c 2000-01-01 00:00:00.000000000 +0100
+++ uClibc-r11027.work/utils/ldconfig.c 2005-10-14 18:14:31.000000000 +0200
@@ -34,6 +34,7 @@
#include <unistd.h>
#include <link.h>
#include <fcntl.h>
+#include <glob.h>
#include <errno.h>
#include <sys/stat.h>
#include <sys/mman.h>
@@ -977,7 +978,45 @@
warnx("Remove `%s' from `%s'\n", cp, LDSO_CONF);
continue;
}
- scan_dir(cp);
+
+ /* ******************************* */
+
+ glob_t result;
+ int j;
+ char *realpath;
+ struct stat64 stat_buf;
+ if (glob(cp, 0, NULL, &result) == 0) {
+
+ for (j = 0; j < result.gl_pathc; j++) {
+
+ /* create a copy entry with expanded path */
+ realpath = xstrdup (result.gl_pathv[j]);
+
+ if (realpath == NULL || stat64 (realpath, &stat_buf)) {
+ if (verbose >= 0)
+ warnx ("Can't stat %s [%i]", realpath, errno);
+ }
+ else {
+ scan_dir(realpath);
+ }
+ free(realpath);
+ }
+
+ }
+ else {
+ if (stat64 (cp, &stat_buf)) {
+ if (verbose >= 0)
+ warnx ("Can't stat %s [%i]", cp, errno);
+ }
+ else {
+ scan_dir(cp);
+ }
+ }
+ globfree (&result);
+
+ /* ******************************* */
+
+
}
free(extpath);
}