summaryrefslogtreecommitdiffstats
path: root/src/ifmonitor.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2004-12-19 00:24:29 +0000
committerLennart Poettering <lennart@poettering.net>2004-12-19 00:24:29 +0000
commit7835658313a752cdee17f2da2f1468063f6bb7c5 (patch)
tree106036347b4b8cbdfa7e1dd6d003b2b7eae23c80 /src/ifmonitor.c
parent800f4322d7f2067b77cb00f2635ecf3125dc7e4c (diff)
gcc 2.95 compat
git-svn-id: file:///home/lennart/svn/public/ifplugd/trunk@116 2bf48fe7-cfc1-0310-909f-d9042e1e0fef
Diffstat (limited to 'src/ifmonitor.c')
-rw-r--r--src/ifmonitor.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ifmonitor.c b/src/ifmonitor.c
index 2edec4a..516bf4b 100644
--- a/src/ifmonitor.c
+++ b/src/ifmonitor.c
@@ -37,7 +37,7 @@
#include "nlapi.h"
static int callback(struct nlmsghdr *n, void *u) {
- int (*cb)(int b, int index, unsigned short type, const char *name) = u;
+ int (*cb)(int b, int index, unsigned short type, const char *name) = (int (*)(int b, int index, unsigned short type, const char *name)) u;
if (n->nlmsg_type == RTM_NEWLINK || n->nlmsg_type == RTM_DELLINK) {
struct rtattr *a;
@@ -54,7 +54,7 @@ static int callback(struct nlmsghdr *n, void *u) {
memset(&ifname, 0, sizeof(ifname));
- a = (void*) i + NLMSG_ALIGN(sizeof(struct ifinfomsg));
+ a = (struct rtattr*) ((char*) i + NLMSG_ALIGN(sizeof(struct ifinfomsg)));
la = NLMSG_PAYLOAD(n, sizeof(struct ifinfomsg));
while (RTA_OK(a, la)) {
@@ -78,5 +78,5 @@ static int callback(struct nlmsghdr *n, void *u) {
}
int ifmonitor_init(int (*cb) (int b, int index, unsigned short type, const char *name)) {
- return nlapi_register(callback, cb);
+ return nlapi_register(callback, (void*) cb);
}