From 24f02b7bba491023ccfad8850269b39970caa25a Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sun, 19 Dec 2004 00:08:01 +0000 Subject: * mii fix * build system update git-svn-id: file:///home/lennart/svn/public/ifplugd/trunk@114 2bf48fe7-cfc1-0310-909f-d9042e1e0fef --- src/ifmonitor.c | 4 ++++ src/ifplugd.c | 8 ++++---- src/ifplugstatus.c | 8 ++++---- src/interface.c | 8 ++++++-- src/nlapi.c | 4 ++++ 5 files changed, 22 insertions(+), 10 deletions(-) diff --git a/src/ifmonitor.c b/src/ifmonitor.c index 83e9bb8..2edec4a 100644 --- a/src/ifmonitor.c +++ b/src/ifmonitor.c @@ -18,6 +18,10 @@ * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include #include diff --git a/src/ifplugd.c b/src/ifplugd.c index 624d991..7d8bba3 100644 --- a/src/ifplugd.c +++ b/src/ifplugd.c @@ -19,6 +19,10 @@ * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include #include @@ -52,10 +56,6 @@ #include "ifmonitor.h" #include "svn-revision.h" -#ifdef HAVE_CONFIG_H -#include -#endif - #define VARRUN "/var/run" #define IFPLUGD_ENV_PREVIOUS "IFPLUGD_PREVIOUS" #define IFPLUGD_ENV_CURRENT "IFPLUGD_CURRENT" diff --git a/src/ifplugstatus.c b/src/ifplugstatus.c index 04c59b9..fed74d8 100644 --- a/src/ifplugstatus.c +++ b/src/ifplugstatus.c @@ -18,6 +18,10 @@ * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include #include @@ -32,10 +36,6 @@ #include "interface.h" #include "svn-revision.h" -#ifdef HAVE_CONFIG_H -#include -#endif - int interface_auto_up = 0, interface_do_message = 0; int verbose = 0; diff --git a/src/interface.c b/src/interface.c index 6007172..21e304c 100644 --- a/src/interface.c +++ b/src/interface.c @@ -18,6 +18,10 @@ * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include #include @@ -108,7 +112,7 @@ interface_status_t interface_detect_beat_mii(int fd, char *iface) { return IFSTATUS_ERR; } - return (((unsigned short*) &ifr.ifr_data)[3] & 0x0016) == 0x0004 ? IFSTATUS_UP : IFSTATUS_DOWN; + return (((unsigned short*) &ifr.ifr_data)[3] & 0x0004) ? IFSTATUS_UP : IFSTATUS_DOWN; } interface_status_t interface_detect_beat_priv(int fd, char *iface) { @@ -136,7 +140,7 @@ interface_status_t interface_detect_beat_priv(int fd, char *iface) { return IFSTATUS_ERR; } - return (((unsigned short*) &ifr.ifr_data)[3] & 0x0016) == 0x0004 ? IFSTATUS_UP : IFSTATUS_DOWN; + return (((unsigned short*) &ifr.ifr_data)[3] & 0x0004) ? IFSTATUS_UP : IFSTATUS_DOWN; } interface_status_t interface_detect_beat_ethtool(int fd, char *iface) { diff --git a/src/nlapi.c b/src/nlapi.c index 3fd0ed6..91865f5 100644 --- a/src/nlapi.c +++ b/src/nlapi.c @@ -18,6 +18,10 @@ * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include #include -- cgit