From 7835658313a752cdee17f2da2f1468063f6bb7c5 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sun, 19 Dec 2004 00:24:29 +0000 Subject: gcc 2.95 compat git-svn-id: file:///home/lennart/svn/public/ifplugd/trunk@116 2bf48fe7-cfc1-0310-909f-d9042e1e0fef --- src/ifmonitor.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/ifmonitor.c') 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); } -- cgit