From c90462bc2688ecb8b7f36d3ef82af37319ff8270 Mon Sep 17 00:00:00 2001 From: Martin Baulig Date: Thu, 3 Dec 1998 16:12:43 +0000 Subject: [PATCH] No longer include , but use GLIBTOP_LINUX_VERSION_CODE 1998-12-03 Martin Baulig * netload.c: No longer include , but use GLIBTOP_LINUX_VERSION_CODE which is set by configure instead. Define _GLIBTOP_IP_FW_ACCTIN and _GLIBTOP_IP_FW_ACCTOUT here and use them instead of IP_FW_F_ACCTIN and IP_FW_F_ACCTOUT. --- sysdeps/linux/ChangeLog | 7 +++++++ sysdeps/linux/netload.c | 9 +++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/sysdeps/linux/ChangeLog b/sysdeps/linux/ChangeLog index 3168ba18..2e0b8771 100644 --- a/sysdeps/linux/ChangeLog +++ b/sysdeps/linux/ChangeLog @@ -1,3 +1,10 @@ +1998-12-03 Martin Baulig + + * netload.c: No longer include , but use + GLIBTOP_LINUX_VERSION_CODE which is set by configure instead. + Define _GLIBTOP_IP_FW_ACCTIN and _GLIBTOP_IP_FW_ACCTOUT here + and use them instead of IP_FW_F_ACCTIN and IP_FW_F_ACCTOUT. + 1998-11-30 Martin Baulig * netload.c: Use correct header files both for libc5 and glibc. diff --git a/sysdeps/linux/netload.c b/sysdeps/linux/netload.c index 9e381df8..7fcf7e17 100644 --- a/sysdeps/linux/netload.c +++ b/sysdeps/linux/netload.c @@ -41,7 +41,8 @@ #include #endif -#include +#define _GLIBTOP_IP_FW_ACCTIN 0x1000 /* Account incoming packets only. */ +#define _GLIBTOP_IP_FW_ACCTOUT 0x2000 /* Account outgoing packets only. */ static const unsigned long _glibtop_sysdeps_netload = (1 << GLIBTOP_NETLOAD_ERRORS_IN) + @@ -176,7 +177,7 @@ glibtop_get_netload_s (glibtop *server, glibtop_netload *buf, * need IP accounting. */ -#if LINUX_VERSION_CODE < 131442 +#if GLIBTOP_LINUX_VERSION_CODE < 131442 /* If IP accounting is enabled in the kernel and it is * enabled for the requested interface, we use it to @@ -214,7 +215,7 @@ glibtop_get_netload_s (glibtop *server, glibtop_netload *buf, packets = strtoul (p, &p, 0); bytes = strtoul (p, &p, 0); - if (flags & IP_FW_F_ACCTIN) { + if (flags & _GLIBTOP_IP_FW_ACCTIN) { /* Incoming packets only. */ buf->packets_total += packets; @@ -225,7 +226,7 @@ glibtop_get_netload_s (glibtop *server, glibtop_netload *buf, buf->flags |= _glibtop_sysdeps_netload_in; - } else if (flags & IP_FW_F_ACCTOUT) { + } else if (flags & _GLIBTOP_IP_FW_ACCTOUT) { /* Outgoing packets only. */ buf->packets_total += packets;