From 7548ba2c273614fb41810eab362ee671779dc074 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20Gallou=C3=ABt?= Date: Mon, 12 Feb 2018 09:41:55 +0000 Subject: [PATCH] Fix ipv6 default value MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Adrien Gallouët --- src/bind.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/bind.c b/src/bind.c index 62e6242..70ccc3e 100644 --- a/src/bind.c +++ b/src/bind.c @@ -16,6 +16,12 @@ #define O_CLOEXEC 0 #endif +#ifdef __linux__ +#define GT_IPV6 1 +#else +#define GT_IPV6 0 +#endif + #define GT_MTU(X) ((X)-28) static void @@ -151,7 +157,7 @@ gt_bind(int argc, char **argv) } int ipv4 = 1; - int ipv6 = !!(__linux__ + 0); + int ipv6 = GT_IPV6; if (argz_is_set(bindz, "v4only")) { ipv4 = 1;