OpenSDE Packages Database (without history before r20070)
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

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../uclibc/ldconfig-glob.patch
  5. # Copyright (C) 2009 - 2010 The OpenSDE Project
  6. # Copyright (C) 2004 - 2007 The T2 SDE Project
  7. #
  8. # More information can be found in the files COPYING and README.
  9. #
  10. # This patch file is dual-licensed. It is available under the license the
  11. # patched project is licensed under, as long as it is an OpenSource license
  12. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  13. # of the GNU General Public License as published by the Free Software
  14. # Foundation; either version 2 of the License, or (at your option) any later
  15. # version.
  16. # --- SDE-COPYRIGHT-NOTE-END ---
  17. Add pathname pattern matching to ldconfig
  18. -- Michael Tross
  19. --- uClibc-0.9.30.3/utils/porting.h.orig 2010-03-18 16:51:39.013157743 +0100
  20. +++ uClibc-0.9.30.3/utils/porting.h 2010-03-18 16:53:00.816997080 +0100
  21. @@ -11,6 +11,7 @@
  22. #include <dirent.h>
  23. #include <errno.h>
  24. #include <fcntl.h>
  25. +#include <glob.h>
  26. #include <limits.h>
  27. #include <stdarg.h>
  28. #include <stdint.h>
  29. --- uClibc-0.9.30.3/utils/ldconfig.c.orig 2010-03-12 20:32:42.000000000 +0100
  30. +++ uClibc-0.9.30.3/utils/ldconfig.c 2010-03-18 16:36:11.013052410 +0100
  31. @@ -969,8 +969,45 @@
  32. warnx("You should remove `%s' from `%s'", cp, LDSO_CONF);
  33. continue;
  34. }
  35. +
  36. + /* ******************************* */
  37. +
  38. + glob_t result;
  39. + int j;
  40. + char *realpath;
  41. + struct stat64 stat_buf;
  42. + if (glob(cp, GLOB_ONLYDIR, NULL, &result) == 0) {
  43. +
  44. + for (j = 0; j < result.gl_pathc; j++) {
  45. +
  46. + /* create a copy entry with expanded path */
  47. + realpath = xstrdup (result.gl_pathv[j]);
  48. +
  49. + if (realpath == NULL || stat64 (realpath, &stat_buf)) {
  50. + if (verbose >= 0)
  51. + warnx ("Can't stat %s [%i]", realpath, errno);
  52. + }
  53. + else {
  54. + scan_dir(realpath);
  55. + }
  56. + free(realpath);
  57. + }
  58. +
  59. + }
  60. + else {
  61. + if (stat64 (cp, &stat_buf)) {
  62. + if (verbose >= 0)
  63. + warnx ("Can't stat %s [%i]", cp, errno);
  64. + }
  65. + else {
  66. scan_dir(cp);
  67. }
  68. + }
  69. + globfree (&result);
  70. +
  71. + /* ******************************* */
  72. +
  73. + }
  74. free(extpath);
  75. }
  76. #endif