Advertisement
jdefelice

smcroute-1.99.0.patch

Oct 15th, 2012
278
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 2.54 KB | None | 0 0
  1. diff -r -u -w smcroute-1.99.0/src/mclab.h smcroute-1.99.0-working/src/mclab.h
  2. --- smcroute-1.99.0/src/mclab.h 2012-05-15 02:49:36.000000000 -0400
  3. +++ smcroute-1.99.0-working/src/mclab.h 2012-10-15 17:15:00.000000000 -0400
  4. @@ -47,9 +47,9 @@
  5.  
  6.  #include "config.h"
  7.  
  8. -#ifdef HAVE_LINUX_MROUTE_H
  9. +#define _LINUX_IN_H
  10. +#include <linux/types.h>
  11.  #include <linux/mroute.h>
  12. -#endif
  13.  
  14.  #ifdef HAVE_LINUX_MROUTE6_H
  15.  #include <linux/mroute6.h>
  16. @@ -90,6 +90,13 @@
  17.   */
  18.  #define ARRAY_ELEMENTS(arr) ((sizeof(arr)/sizeof(0[arr])) / ((size_t)(!(sizeof(arr) % sizeof(0[arr])))))
  19.  
  20. +//(jdefelice) i don't have mroute6.h, so ... approxmiate?
  21. +#ifndef MAXMIFS
  22. +#ifdef MAXVIFS
  23. +#define MAXMIFS MAXVIFS
  24. +#endif
  25. +#endif
  26. +
  27.  #define MAX_MC_VIFS    MAXVIFS /* = to MAXVIFS from linux/mroute.h */
  28.  #define MAX_MC_MIFS    MAXMIFS /* = to MAXMIFS from linux/mroute6.h */
  29.  
  30. diff -r -u -w smcroute-1.99.0/src/parse-conf.c smcroute-1.99.0-working/src/parse-conf.c
  31. --- smcroute-1.99.0/src/parse-conf.c    2012-05-15 02:49:36.000000000 -0400
  32. +++ smcroute-1.99.0-working/src/parse-conf.c    2012-10-15 17:18:39.000000000 -0400
  33. @@ -73,7 +73,7 @@
  34.     }
  35.  
  36.     if (strchr(group, ':')) {
  37. -#ifndef HAVE_IPV6_MULTICAST_HOST
  38. +#if !(defined HAVE_IPV6_MULTICAST_HOST && defined HAVE_LINUX_MROUTE6_H)
  39.         smclog(LOG_WARNING, 0, "Line %02: Sadly this build of smcroute does not support IPv6.", lineno);
  40.         result = 0;
  41.  #else
  42. @@ -110,7 +110,7 @@
  43.     }
  44.  
  45.     if (strchr(group, ':')) {
  46. -#ifndef HAVE_IPV6_MULTICAST_HOST
  47. +#if !(defined HAVE_IPV6_MULTICAST_HOST && defined HAVE_LINUX_MROUTE6_H)
  48.         smclog(LOG_WARNING, 0, "Line %02: Sadly this build of smcroute does not support IPv6.", lineno);
  49.         result = 0;
  50.  #else
  51. diff -r -u -w smcroute-1.99.0/src/smcroute.c smcroute-1.99.0-working/src/smcroute.c
  52. --- smcroute-1.99.0/src/smcroute.c  2012-05-15 02:49:36.000000000 -0400
  53. +++ smcroute-1.99.0-working/src/smcroute.c  2012-10-15 17:19:41.000000000 -0400
  54. @@ -29,6 +29,8 @@
  55.  #include <sys/stat.h>
  56.  #include <fcntl.h>
  57.  
  58. +#include "mclab.h"
  59. +
  60.  #include <sys/socket.h>
  61.  #include <netinet/in.h>
  62.  #include <netinet/ip.h>
  63. @@ -37,7 +39,6 @@
  64.  #include <signal.h>
  65.  #include <unistd.h>
  66.  
  67. -#include "mclab.h"
  68.  
  69.  #include "config.h"
  70.  #include "build.h"
  71. @@ -355,7 +356,7 @@
  72.                 else
  73.                     result = mcgroup4_leave(ifname, group);
  74.             } else {    /* IPv6 */
  75. -#ifndef HAVE_IPV6_MULTICAST_HOST
  76. +#if !(defined HAVE_IPV6_MULTICAST_HOST && defined HAVE_LINUX_MROUTE6_H)
  77.                 smclog(LOG_WARNING, 0, "Not built with IPv6 support.");
  78.  #else
  79.                 struct in6_addr group;
  80. Only in smcroute-1.99.0-working: xsconf.smcroute
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement