Просмотр исходного кода

2.6.19 kernel headers do not include IFA_RTA so we provide it.
Patch from Fabio Massimo Di Nitto


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1290 fd59a12c-fef9-0310-b244-a6a79926bd2f

Patrick Caulfield 19 лет назад
Родитель
Сommit
b58bed720f
1 измененных файлов с 10 добавлено и 0 удалено
  1. 10 0
      exec/totemip.c

+ 10 - 0
exec/totemip.c

@@ -63,6 +63,16 @@
 /* ARGH!! I hate netlink */
 /* ARGH!! I hate netlink */
 #include <asm/types.h>
 #include <asm/types.h>
 #include <linux/rtnetlink.h>
 #include <linux/rtnetlink.h>
+
+/* this should catch 2.6.19 headers */
+#ifndef IFA_MAX
+#include <linux/if_addr.h>
+#endif
+/* redefine macro that disappeared in 2.6.19 */
+#ifndef IFA_RTA
+#define IFA_RTA(r)  ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifaddrmsg))))
+#endif
+
 #endif
 #endif
 
 
 #if ! defined(OPENAIS_SOLARIS) && ! defined(s6_addr16)
 #if ! defined(OPENAIS_SOLARIS) && ! defined(s6_addr16)