]> source.dussan.org Git - rspamd.git/commitdiff
SOL_IPV6 is not defined on Darwin.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 17 Mar 2015 11:25:05 +0000 (11:25 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 17 Mar 2015 11:25:05 +0000 (11:25 +0000)
src/libutil/addr.c

index 2db961574fd99641339ede83aeadad77fd445fcc..e115072b1a9c80f2217252fecc0af8d693a58ead 100644 (file)
@@ -494,7 +494,11 @@ rspamd_inet_address_listen (const rspamd_inet_addr_t *addr, gint type,
        if (addr->af == AF_INET6) {
                /* We need to set this flag to avoid errors */
                on = 1;
+#ifdef SOL_IPV6
                setsockopt (fd, SOL_IPV6, IPV6_V6ONLY, (const void *)&on, sizeof (gint));
+#elif defined(IPPROTO_IPV6)
+               setsockopt (fd, IPPROTO_IPV6, IPV6_V6ONLY, (const void *)&on, sizeof (gint));
+#endif
        }
 #endif