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.
 
 
 
 
 
 

76 lines
2.0 KiB

# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../uclibc/ldconfig-glob.patch
# Copyright (C) 2009 The OpenSDE Project
# Copyright (C) 2004 - 2007 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
--- ./utils/ldconfig.c.orig 2007-04-18 01:08:20.000000000 +0200
+++ ./utils/ldconfig.c 2007-05-08 05:37:25.000000000 +0200
@@ -36,6 +36,7 @@
#include <unistd.h>
#include <link.h>
#include <fcntl.h>
+#include <glob.h>
#include <errno.h>
#include <sys/stat.h>
#include <sys/mman.h>
@@ -995,8 +996,45 @@
warnx("You should remove `%s' from `%s'", cp, LDSO_CONF);
continue;
}
+
+ /* ******************************* */
+
+ glob_t result;
+ int j;
+ char *realpath;
+ struct stat64 stat_buf;
+ if (glob(cp, GLOB_ONLYDIR, 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);
}
#endif