diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-03-17 11:25:05 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-03-17 11:25:05 +0000 |
commit | 7c433350c5ee177af72cfa5011bd8db00a495f56 (patch) | |
tree | 7a6c04febf76461e043415db393bd4c84c8bc157 /src/libutil | |
parent | 1911f6661799fa482ab5adeac64fa8cd46e2b527 (diff) | |
download | rspamd-7c433350c5ee177af72cfa5011bd8db00a495f56.tar.gz rspamd-7c433350c5ee177af72cfa5011bd8db00a495f56.zip |
SOL_IPV6 is not defined on Darwin.
Diffstat (limited to 'src/libutil')
-rw-r--r-- | src/libutil/addr.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libutil/addr.c b/src/libutil/addr.c index 2db961574..e115072b1 100644 --- a/src/libutil/addr.c +++ b/src/libutil/addr.c @@ -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 |