From: mb Date: Sat, 16 Oct 2010 00:13:23 +0000 (+0000) Subject: collectd: Fix build on 2.6.36 X-Git-Url: http://207.154.207.93/?a=commitdiff_plain;h=0031e9bf001b79f323a80b79059479e309411837;p=packages.git collectd: Fix build on 2.6.36 git-svn-id: svn://svn.openwrt.org/openwrt/packages@23467 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- diff --git a/utils/collectd/patches/110-net-device-stats.patch b/utils/collectd/patches/110-net-device-stats.patch new file mode 100644 index 000000000..d619338e4 --- /dev/null +++ b/utils/collectd/patches/110-net-device-stats.patch @@ -0,0 +1,46 @@ +--- + src/interface.c | 33 ++++++++++++++++++++++++++++++++- + 1 file changed, 32 insertions(+), 1 deletion(-) + +--- collectd-4.9.1.orig/src/interface.c ++++ collectd-4.9.1/src/interface.c +@@ -203,7 +203,38 @@ static int interface_read (void) + # define IFA_RX_ERROR rx_errors + # define IFA_TX_ERROR tx_errors + #else +-# error "No suitable type for `struct ifaddrs->ifa_data' found." ++struct net_device_stats { ++ unsigned long rx_packets; ++ unsigned long tx_packets; ++ unsigned long rx_bytes; ++ unsigned long tx_bytes; ++ unsigned long rx_errors; ++ unsigned long tx_errors; ++ unsigned long rx_dropped; ++ unsigned long tx_dropped; ++ unsigned long multicast; ++ unsigned long collisions; ++ unsigned long rx_length_errors; ++ unsigned long rx_over_errors; ++ unsigned long rx_crc_errors; ++ unsigned long rx_frame_errors; ++ unsigned long rx_fifo_errors; ++ unsigned long rx_missed_errors; ++ unsigned long tx_aborted_errors; ++ unsigned long tx_carrier_errors; ++ unsigned long tx_fifo_errors; ++ unsigned long tx_heartbeat_errors; ++ unsigned long tx_window_errors; ++ unsigned long rx_compressed; ++ unsigned long tx_compressed; ++}; ++# define IFA_DATA net_device_stats ++# define IFA_RX_BYTES rx_bytes ++# define IFA_TX_BYTES tx_bytes ++# define IFA_RX_PACKT rx_packets ++# define IFA_TX_PACKT tx_packets ++# define IFA_RX_ERROR rx_errors ++# define IFA_TX_ERROR tx_errors + #endif + + struct IFA_DATA *if_data;