From d6af701250915fdc7449500d9191f4eb2e6cfa4d Mon Sep 17 00:00:00 2001 From: Dmitrij Tejblum Date: Mon, 22 Aug 2011 11:39:35 +0400 Subject: lib: use "protocol-independed API" from RFC3678, if that is available (This commit is based on the patch from BZ#420, and should fix that bug.) * configure.ac: detect availability of that API * sockopt.c (setsockopt_ipv4_multicast): use it for join/leave IPv4 multicast groups --- configure.ac | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index a5b9dc43..40e31f25 100755 --- a/configure.ac +++ b/configure.ac @@ -944,6 +944,15 @@ AC_TRY_COMPILE([#ifdef HAVE_SYS_PARAM_H AC_DEFINE(HAVE_BSD_STRUCT_IP_MREQ_HACK,,[Can pass ifindex in struct ip_mreq])], AC_MSG_RESULT(no)) +AC_MSG_CHECKING([for RFC3678 protocol-independed API]) +AC_TRY_COMPILE([ +#include +#include +], [struct group_req gr; int sock; setsockopt(sock, IPPROTO_IP, MCAST_JOIN_GROUP, (void*)&gr, sizeof(gr)); +], [AC_MSG_RESULT(yes) +AC_DEFINE(HAVE_RFC3678,1,[Have RFC3678 protocol-independed API])], +AC_MSG_RESULT(no)) + dnl --------------------------------------------------------------- dnl figure out how to check link-state dnl --------------------------------------------------------------- -- cgit v1.2.1