summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Korsgaard <jacmet@sunsite.dk>2008-10-29 07:35:03 +0000
committerPeter Korsgaard <jacmet@sunsite.dk>2008-10-29 07:35:03 +0000
commit4baf71840f29afd5925fddb618d6276992a8a26f (patch)
tree6215b327213997a4691ffa9061ae8fa3f0022c1d
parent8d6e9e3907f13a26781d3f0f69e225b9eb6c871e (diff)
downloadbuildroot-novena-4baf71840f29afd5925fddb618d6276992a8a26f.tar.gz
buildroot-novena-4baf71840f29afd5925fddb618d6276992a8a26f.zip
bind: use strchr() instead of index()
-rw-r--r--package/bind/bind-9.3.2-susv3-legacy.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/package/bind/bind-9.3.2-susv3-legacy.patch b/package/bind/bind-9.3.2-susv3-legacy.patch
new file mode 100644
index 000000000..c867828e3
--- /dev/null
+++ b/package/bind/bind-9.3.2-susv3-legacy.patch
@@ -0,0 +1,33 @@
+---
+ lib/isc/unix/ifiter_ioctl.c | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+Index: bind-9.3.2/lib/isc/unix/ifiter_ioctl.c
+===================================================================
+--- bind-9.3.2.orig/lib/isc/unix/ifiter_ioctl.c
++++ bind-9.3.2/lib/isc/unix/ifiter_ioctl.c
+@@ -17,11 +17,12 @@
+
+ /* $Id: ifiter_ioctl.c,v 1.19.2.5.2.17 2005/10/14 02:13:07 marka Exp $ */
+
++#include <string.h>
++
+ /*
+ * Obtain the list of network interfaces using the SIOCGLIFCONF ioctl.
+ * See netintro(4).
+ */
+-
+ #if defined(SIOCGLIFCONF) && defined(SIOCGLIFADDR)
+ #ifdef ISC_PLATFORM_HAVEIF_LADDRCONF
+ #define lifc_len iflc_len
+@@ -478,8 +479,8 @@
+ for (i = 0; i < 16; i++) {
+ unsigned char byte;
+ static const char hex[] = "0123456789abcdef";
+- byte = ((index(hex, address[i * 2]) - hex) << 4) |
+- (index(hex, address[i * 2 + 1]) - hex);
++ byte = ((strchr(hex, address[i * 2]) - hex) << 4) |
++ (strchr(hex, address[i * 2 + 1]) - hex);
+ addr6.s6_addr[i] = byte;
+ }
+ iter->current.af = AF_INET6;