summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f4a7f59)
raw | patch | inline | side by side (parent: f4a7f59)
author | Sebastian Harl <sh@tokkee.org> | |
Sun, 9 Jul 2006 18:15:54 +0000 (18:15 +0000) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Sun, 9 Jul 2006 18:15:54 +0000 (18:15 +0000) |
Not using getifaddrs() is now the default in upstream.
debian/changelog | patch | blob | history | |
debian/patches/00list | [deleted file] | patch | blob | history |
debian/patches/getifaddrs.dpatch | [deleted file] | patch | blob | history |
diff --git a/debian/changelog b/debian/changelog
index ef35c22b314192168c73a49b7345280e634b90aa..2938f259613cb592a0f7509e3f264f1ccb01020e 100644 (file)
--- a/debian/changelog
+++ b/debian/changelog
* 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 <tokkee@alba> Sun, 9 Jul 2006 19:01:49 +0200
diff --git a/debian/patches/00list b/debian/patches/00list
--- a/debian/patches/00list
+++ /dev/null
@@ -1 +0,0 @@
-getifaddrs.dpatch
diff --git a/debian/patches/getifaddrs.dpatch b/debian/patches/getifaddrs.dpatch
+++ /dev/null
@@ -1,96 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## getifaddrs.dpatch by Sebastian Harl <sh@tokkee.org>
-##
-## 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;