From f6328ba92b5af4f15524dcc3aca5061c17676417 Mon Sep 17 00:00:00 2001 From: Christian Wiese Date: Fri, 5 Oct 2007 23:00:01 +0200 Subject: [PATCH] Fixed hotplug2 to use dirent64/readdir64 for dietlibc - d_type is just available while using dirent64 on dietlibc --- base/dietlibc/patches/pkg_hotplug2.patch | 56 ++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 base/dietlibc/patches/pkg_hotplug2.patch diff --git a/base/dietlibc/patches/pkg_hotplug2.patch b/base/dietlibc/patches/pkg_hotplug2.patch new file mode 100644 index 000000000..5262d5dd5 --- /dev/null +++ b/base/dietlibc/patches/pkg_hotplug2.patch @@ -0,0 +1,56 @@ +--- ./linux24_compat/hotplug2-coldplug-2.4.c.orig 2007-10-05 03:42:18.000000000 +0200 ++++ ./linux24_compat/hotplug2-coldplug-2.4.c 2007-10-05 03:51:16.000000000 +0200 +@@ -160,7 +160,7 @@ + + DIR *procdir, *pcidir; + FILE *item; +- struct dirent *cur_bus, *cur_device; ++ struct dirent64 *cur_bus, *cur_device; + + procdir = opendir("/proc/bus/pci"); + if (procdir == NULL) { +@@ -168,7 +168,7 @@ + return; + } + +- while ((cur_bus = readdir(procdir)) != NULL) { ++ while ((cur_bus = readdir64(procdir)) != NULL) { + if (cur_bus->d_type != DT_DIR) + continue; + +@@ -179,7 +179,7 @@ + snprintf(pci_dir_name, 255, "/proc/bus/pci/%s", cur_bus->d_name); + pcidir = opendir(pci_dir_name); + +- while ((cur_device = readdir(pcidir)) != NULL) { ++ while ((cur_device = readdir64(pcidir)) != NULL) { + if (cur_device->d_type != DT_REG) + continue; + +@@ -257,7 +257,7 @@ + + DIR *procdir, *usbdir; + FILE *item; +- struct dirent *cur_bus, *cur_device; ++ struct dirent64 *cur_bus, *cur_device; + + procdir = opendir("/proc/bus/usb"); + if (procdir == NULL) { +@@ -265,7 +265,7 @@ + return; + } + +- while ((cur_bus = readdir(procdir)) != NULL) { ++ while ((cur_bus = readdir64(procdir)) != NULL) { + if (cur_bus->d_type != DT_DIR) + continue; + +@@ -276,7 +276,7 @@ + snprintf(usb_dir_name, 255, "/proc/bus/usb/%s", cur_bus->d_name); + usbdir = opendir(usb_dir_name); + +- while ((cur_device = readdir(usbdir)) != NULL) { ++ while ((cur_device = readdir64(usbdir)) != NULL) { + if (cur_device->d_type != DT_REG) + continue; +