summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author"Steven J. Hill" <sjhill@realitydiluted.com>2006-12-05 02:16:03 +0000
committer"Steven J. Hill" <sjhill@realitydiluted.com>2006-12-05 02:16:03 +0000
commitf460603f02092b4f514d108dd8b4167a7a056213 (patch)
tree2e9ccdd20be04e324bcb1e5a8ac2f831b8982812
parente9fd85f5f98c888eedaf54203b6caeae5239fad1 (diff)
downloadbuildroot-novena-f460603f02092b4f514d108dd8b4167a7a056213.tar.gz
buildroot-novena-f460603f02092b4f514d108dd8b4167a7a056213.zip
Patch packages to remove legacy and deprecated functions. All of these patches have been sent upstream to the various maintainers.
-rw-r--r--package/module-init-tools/module-init-tools-remove-index.patch12
-rw-r--r--package/procps/procps-remove-index.patch21
-rw-r--r--package/util-linux/util-linux-remove-deprecated-functions.patch49
3 files changed, 82 insertions, 0 deletions
diff --git a/package/module-init-tools/module-init-tools-remove-index.patch b/package/module-init-tools/module-init-tools-remove-index.patch
new file mode 100644
index 000000000..1a2da2859
--- /dev/null
+++ b/package/module-init-tools/module-init-tools-remove-index.patch
@@ -0,0 +1,12 @@
+diff -ur module-init-tools-3.2.2/modprobe.c module-init-tools-3.2.2-patched/modprobe.c
+--- module-init-tools-3.2.2/modprobe.c 2005-12-01 17:42:09.000000000 -0600
++++ module-init-tools-3.2.2-patched/modprobe.c 2006-12-04 19:50:50.353237649 -0600
+@@ -270,7 +270,7 @@
+ char *modname;
+
+ /* Ignore lines without : or which start with a # */
+- ptr = index(line, ':');
++ ptr = strchr(line, ':');
+ if (ptr == NULL || line[strspn(line, "\t ")] == '#')
+ return 0;
+
diff --git a/package/procps/procps-remove-index.patch b/package/procps/procps-remove-index.patch
new file mode 100644
index 000000000..4f4cfb7bb
--- /dev/null
+++ b/package/procps/procps-remove-index.patch
@@ -0,0 +1,21 @@
+diff -ur procps-3.2.5/sysctl.c procps-3.2.5-patched/sysctl.c
+--- procps-3.2.5/sysctl.c 2005-01-05 15:00:47.000000000 -0600
++++ procps-3.2.5-patched/sysctl.c 2006-12-04 19:51:36.272843000 -0600
+@@ -272,7 +272,7 @@
+ return 0;
+ } /* end if */
+
+- equals = index(setting, '=');
++ equals = strchr(setting, '=');
+
+ if (!equals) {
+ fprintf(stderr, ERR_NO_EQUALS, setting);
+@@ -498,7 +498,7 @@
+ if (NameOnly && Quiet) // nonsense
+ return Usage(me);
+ SwitchesAllowed = false;
+- if (WriteMode || index(*argv, '='))
++ if (WriteMode || strchr(*argv, '='))
+ ReturnCode = WriteSetting(*argv);
+ else
+ ReturnCode = ReadSetting(*argv);
diff --git a/package/util-linux/util-linux-remove-deprecated-functions.patch b/package/util-linux/util-linux-remove-deprecated-functions.patch
new file mode 100644
index 000000000..084397954
--- /dev/null
+++ b/package/util-linux/util-linux-remove-deprecated-functions.patch
@@ -0,0 +1,49 @@
+diff -ur util-linux-2.12r/misc-utils/logger.c util-linux-2.12r-patched/misc-utils/logger.c
+--- util-linux-2.12r/misc-utils/logger.c 2004-09-06 16:13:49.000000000 -0500
++++ util-linux-2.12r-patched/misc-utils/logger.c 2006-12-04 19:52:24.068596984 -0600
+@@ -198,7 +198,7 @@
+ } else {
+ if (p != buf)
+ *p++ = ' ';
+- bcopy(*argv++, p, len);
++ memcpy(p, *argv++, len);
+ *(p += len) = '\0';
+ }
+ }
+diff -ur util-linux-2.12r/misc-utils/whereis.c util-linux-2.12r-patched/misc-utils/whereis.c
+--- util-linux-2.12r/misc-utils/whereis.c 2001-03-15 04:09:58.000000000 -0600
++++ util-linux-2.12r-patched/misc-utils/whereis.c 2006-12-04 19:52:43.210100415 -0600
+@@ -323,14 +323,14 @@
+ char dirbuf[1024];
+ struct stat statbuf;
+
+- dd = index(dir, '*');
++ dd = strchr(dir, '*');
+ if (!dd)
+ goto noglob;
+
+ l = strlen(dir);
+ if (l < sizeof(dirbuf)) { /* refuse excessively long names */
+ strcpy (dirbuf, dir);
+- d = index(dirbuf, '*');
++ d = strchr(dirbuf, '*');
+ *d = 0;
+ dirp = opendir(dirbuf);
+ if (dirp == NULL)
+diff -ur util-linux-2.12r/mount/mount.c util-linux-2.12r-patched/mount/mount.c
+--- util-linux-2.12r/mount/mount.c 2004-12-21 16:00:36.000000000 -0600
++++ util-linux-2.12r-patched/mount/mount.c 2006-12-04 19:54:16.317414647 -0600
+@@ -488,11 +488,11 @@
+
+ /* Accept a comma-separated list of types, and try them one by one */
+ /* A list like "nonfs,.." indicates types not to use */
+- if (*types && strncmp(*types, "no", 2) && index(*types,',')) {
++ if (*types && strncmp(*types, "no", 2) && strchr(*types,',')) {
+ char *t = strdup(*types);
+ char *p;
+
+- while((p = index(t,',')) != NULL) {
++ while((p = strchr(t,',')) != NULL) {
+ *p = 0;
+ args.type = *types = t;
+ if(do_mount_syscall (&args) == 0)