diff options
author | Dmitrij Tejblum <tejblum@yandex-team.ru> | 2011-08-22 11:39:35 +0400 |
---|---|---|
committer | Denis Ovsienko <infrastation@yandex.ru> | 2011-09-27 21:39:12 +0400 |
commit | 10d04cdb4198b69073ea0cdd4c26a64d6697b33e (patch) | |
tree | f5b06a3be2a574d92bd7b4c0c90815cffedcdc43 /configure.ac | |
parent | ee7e75d38bdb139b10f3a1d35209758409db7fb5 (diff) |
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
Diffstat (limited to 'configure.ac')
-rwxr-xr-x | configure.ac | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 899108d9..63e8dcf0 100755 --- a/configure.ac +++ b/configure.ac @@ -943,6 +943,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 <sys/types.h> +#include <netinet/in.h> +], [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 --------------------------------------------------------------- |