From df3d145cee3dff42eb601424caff1f7b9f830efb Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Sun, 9 Jul 2006 18:15:54 +0000 Subject: [PATCH] Removed getifaddrs.dpatch. Not using getifaddrs() is now the default in upstream. --- debian/changelog | 2 + debian/patches/00list | 1 - debian/patches/getifaddrs.dpatch | 96 -------------------------------- 3 files changed, 2 insertions(+), 97 deletions(-) delete mode 100644 debian/patches/00list delete mode 100755 debian/patches/getifaddrs.dpatch diff --git a/debian/changelog b/debian/changelog index ef35c22..2938f25 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,8 @@ collectd (3.10.0-1) unstable; urgency=low * New upstream release. * Upstream no longer provides a debian/ directory. Thus no repackaging is required any longer. + * Not using getifaddrs() is now the default in upstream. getifaddrs.dpatch + no longer needed. * Added collectd-hddtemp as a suggestion to the collectd package. -- Sebastian Harl Sun, 9 Jul 2006 19:01:49 +0200 diff --git a/debian/patches/00list b/debian/patches/00list deleted file mode 100644 index 21a5503..0000000 --- a/debian/patches/00list +++ /dev/null @@ -1 +0,0 @@ -getifaddrs.dpatch diff --git a/debian/patches/getifaddrs.dpatch b/debian/patches/getifaddrs.dpatch deleted file mode 100755 index 6ca9b80..0000000 --- a/debian/patches/getifaddrs.dpatch +++ /dev/null @@ -1,96 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## getifaddrs.dpatch by Sebastian Harl -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: Read traffic information from /proc by default instead of using -## DP: getifaddrs(). getifaddrs() does not seem to work correctly on AMD64. - -@DPATCH@ - -diff -urN collectd-3.9.2.orig/src/traffic.c collectd-3.9.2/src/traffic.c ---- collectd-3.9.2.orig/src/traffic.c 2006-05-09 11:10:34.000000000 +0200 -+++ collectd-3.9.2/src/traffic.c 2006-06-02 16:12:28.000000000 +0200 -@@ -143,41 +143,7 @@ - - static void traffic_read (void) - { --#if HAVE_GETIFADDRS -- struct ifaddrs *if_list; -- struct ifaddrs *if_ptr; -- --#if HAVE_STRUCT_IF_DATA --# define IFA_DATA if_data --# define IFA_INCOMING ifi_ibytes --# define IFA_OUTGOING ifi_obytes --#elif HAVE_STRUCT_NET_DEVICE_STATS --# define IFA_DATA net_device_stats --# define IFA_INCOMING rx_bytes --# define IFA_OUTGOING tx_bytes --#else --# error "No suitable type for `struct ifaddrs->ifa_data' found." --#endif -- -- struct IFA_DATA *if_data; -- -- if (getifaddrs (&if_list) != 0) -- return; -- -- for (if_ptr = if_list; if_ptr != NULL; if_ptr = if_ptr->ifa_next) -- { -- if ((if_data = (struct IFA_DATA *) if_ptr->ifa_data) == NULL) -- continue; -- -- traffic_submit (if_ptr->ifa_name, -- if_data->IFA_INCOMING, -- if_data->IFA_OUTGOING); -- } -- -- freeifaddrs (if_list); --/* #endif HAVE_GETIFADDRS */ -- --#elif KERNEL_LINUX -+#if KERNEL_LINUX - FILE *fh; - char buffer[1024]; - unsigned long long incoming, outgoing; -@@ -221,6 +187,40 @@ - fclose (fh); - /* #endif KERNEL_LINUX */ - -+#elif HAVE_GETIFADDRS -+ struct ifaddrs *if_list; -+ struct ifaddrs *if_ptr; -+ -+#if HAVE_STRUCT_IF_DATA -+# define IFA_DATA if_data -+# define IFA_INCOMING ifi_ibytes -+# define IFA_OUTGOING ifi_obytes -+#elif HAVE_STRUCT_NET_DEVICE_STATS -+# define IFA_DATA net_device_stats -+# define IFA_INCOMING rx_bytes -+# define IFA_OUTGOING tx_bytes -+#else -+# error "No suitable type for `struct ifaddrs->ifa_data' found." -+#endif -+ -+ struct IFA_DATA *if_data; -+ -+ if (getifaddrs (&if_list) != 0) -+ return; -+ -+ for (if_ptr = if_list; if_ptr != NULL; if_ptr = if_ptr->ifa_next) -+ { -+ if ((if_data = (struct IFA_DATA *) if_ptr->ifa_data) == NULL) -+ continue; -+ -+ traffic_submit (if_ptr->ifa_name, -+ if_data->IFA_INCOMING, -+ if_data->IFA_OUTGOING); -+ } -+ -+ freeifaddrs (if_list); -+/* #endif HAVE_GETIFADDRS */ -+ - #elif defined(HAVE_LIBKSTAT) - int i; - unsigned long long incoming, outgoing; -- 2.30.2