netlink plugin: Use the defines to determine where the `libnetlink.h' is.
authorFlorian Forster <octo@huhu.verplant.org>
Tue, 4 Sep 2007 08:32:13 +0000 (10:32 +0200)
committerFlorian Forster <octo@huhu.verplant.org>
Tue, 4 Sep 2007 08:32:13 +0000 (10:32 +0200)
src/netlink.c

index 6f9f593..3cd91d8 100644 (file)
 
 #include <asm/types.h>
 #include <sys/socket.h>
-#include <iproute/libnetlink.h>
 #include <linux/netlink.h>
 #include <linux/rtnetlink.h>
 #include <linux/gen_stats.h>
 
-#include <iproute/ll_map.h>
+#if HAVE_LIBNETLINK_H
+# include <libnetlink.h>
+#elif HAVE_IPROUTE_LIBNETLINK_H
+# include <iproute/libnetlink.h>
+#elif HAVE_LINUX_LIBNETLINK_H
+# include <linux/libnetlink.h>
+#endif
 
 typedef struct ir_ignorelist_s
 {
@@ -509,12 +514,6 @@ static int ir_init (void)
     return (-1);
   }
 
-  if (ll_init_map (&rth) != 0)
-  {
-    ERROR ("netlink plugin: ir_read: ll_init_map failed.");
-    return (-1);
-  }
-
   return (0);
 } /* int ir_init */