summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--aclocal.m412
-rw-r--r--configure.in1
-rw-r--r--sysdep/autoconf.h.in3
-rw-r--r--sysdep/unix/io.c3
4 files changed, 17 insertions, 2 deletions
diff --git a/aclocal.m4 b/aclocal.m4
index 651b0db..98a5ca8 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -116,3 +116,15 @@ case "$bird_cv_type_time_t" in
*) AC_DEFINE(TIME_T_IS_SIGNED) ;;
esac
])
+
+AC_DEFUN(BIRD_CHECK_STRUCT_IP_MREQN,
+[AC_CACHE_CHECK([struct ip_mreqn], bird_cv_struct_ip_mreqn,[
+AC_TRY_COMPILE([#include <netinet/in.h>
+],[struct ip_mreqn x;
+],[bird_cv_struct_ip_mreqn=yes
+],[bird_cv_struct_ip_mreqn=no
+])])
+if test "$bird_cv_struct_ip_mreqn" = yes ; then
+ AC_DEFINE(HAVE_STRUCT_IP_MREQN)
+fi
+])
diff --git a/configure.in b/configure.in
index 2cf123a..a8ef734 100644
--- a/configure.in
+++ b/configure.in
@@ -109,6 +109,7 @@ BIRD_CHECK_INTEGERS
BIRD_CHECK_ENDIAN
BIRD_CHECK_STRUCT_ALIGN
BIRD_CHECK_TIME_T
+BIRD_CHECK_STRUCT_MREQN
if test "$enable_debug" = yes ; then
AC_DEFINE(PATH_CONFIG_DIR, ".")
diff --git a/sysdep/autoconf.h.in b/sysdep/autoconf.h.in
index ae4d6b6..6c76f1a 100644
--- a/sysdep/autoconf.h.in
+++ b/sysdep/autoconf.h.in
@@ -29,6 +29,9 @@
#undef TIME_T_IS_64BIT
#undef TIME_T_IS_SIGNED
+/* We have struct ip_mreqn in <netinet/in.h> */
+#undef HAVE_STRUCT_IP_MREQN
+
/* Protocols compiled in */
#undef CONFIG_STATIC
#undef CONFIG_RIP
diff --git a/sysdep/unix/io.c b/sysdep/unix/io.c
index 69f8a5c..d98972c 100644
--- a/sysdep/unix/io.c
+++ b/sysdep/unix/io.c
@@ -407,8 +407,7 @@ sk_open(sock *s)
case SK_UDP_MC:
case SK_IP_MC:
{
-#ifdef HAVE_IP_MREQN
- /* FIXME: Define HAVE_IP_MREQN somewhere :) */
+#ifdef HAVE_STRUCT_IP_MREQN
struct ip_mreqn mreq;
#define mreq_add mreq
ASSERT(s->iface);