module-init-tools: fix build against uclibc
authorKoen Kooi <koen@openembedded.org>
Sun, 13 May 2007 08:35:14 +0000 (08:35 +0000)
committerKoen Kooi <koen@openembedded.org>
Sun, 13 May 2007 08:35:14 +0000 (08:35 +0000)
packages/module-init-tools/files/module-init-tools-remove-index.patch [new file with mode: 0644]
packages/module-init-tools/module-init-tools_3.2.2.bb

diff --git a/packages/module-init-tools/files/module-init-tools-remove-index.patch b/packages/module-init-tools/files/module-init-tools-remove-index.patch
new file mode 100644 (file)
index 0000000..c56532e
--- /dev/null
@@ -0,0 +1,14 @@
+http://uclibc.org/cgi-bin/viewcvs.cgi/trunk/buildroot/package/module-init-tools/module-init-tools-remove-index.patch?rev=16782&view=auto
+
+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;
index c7782cb..dcf9063 100644 (file)
@@ -3,7 +3,7 @@ removing kernel modules for Linux (versions 2.5.48 and above). It serves \
 the same function that the modutils package serves for Linux 2.4."
 LICENSE = "GPL"
 SECTION = "base"
-PR = "r2"
+PR = "r3"
 
 PACKAGES =+ "module-init-tools-insmod-static module-init-tools-depmod"
 RDEPENDS_${PN} += "module-init-tools-depmod"
@@ -15,7 +15,8 @@ SRC_URI = "${KERNELORG_MIRROR}/pub/linux/utils/kernel/module-init-tools/module-i
           file://ignore_arch_directory;patch=1 \
           file://modutils_extension;patch=1 \
           file://no_man_rebuild;patch=1 \
-          file://manpagesopt;patch=1 "
+          file://manpagesopt;patch=1 \
+           file://module-init-tools-remove-index.patch;patch=1 "
 S = "${WORKDIR}/module-init-tools-${PV}"
 
 EXTRA_OECONF = "--disable-manpages"