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.2 KiB

# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../uclibc/ldconfig-glob.patch
# Copyright (C) 2009 - 2010 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
--- uClibc-0.9.30.3/utils/porting.h.orig 2010-03-18 16:51:39.013157743 +0100
+++ uClibc-0.9.30.3/utils/porting.h 2010-03-18 16:53:00.816997080 +0100
@@ -11,6 +11,7 @@
#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
+#include <glob.h>
#include <limits.h>
#include <stdarg.h>
#include <stdint.h>
--- uClibc-0.9.30.3/utils/ldconfig.c.orig 2010-03-12 20:32:42.000000000 +0100
+++ uClibc-0.9.30.3/utils/ldconfig.c 2010-03-18 16:36:11.013052410 +0100
@@ -969,8 +969,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