Fix ipv6 default value

Signed-off-by: Adrien Gallouët <adrien@gallouet.fr>
This commit is contained in:
Adrien Gallouët
2018-02-12 09:41:55 +00:00
parent 22634d14fe
commit 7548ba2c27

View File

@@ -16,6 +16,12 @@
#define O_CLOEXEC 0 #define O_CLOEXEC 0
#endif #endif
#ifdef __linux__
#define GT_IPV6 1
#else
#define GT_IPV6 0
#endif
#define GT_MTU(X) ((X)-28) #define GT_MTU(X) ((X)-28)
static void static void
@@ -151,7 +157,7 @@ gt_bind(int argc, char **argv)
} }
int ipv4 = 1; int ipv4 = 1;
int ipv6 = !!(__linux__ + 0); int ipv6 = GT_IPV6;
if (argz_is_set(bindz, "v4only")) { if (argz_is_set(bindz, "v4only")) {
ipv4 = 1; ipv4 = 1;