From: Lars Wendler Date: Tue, 18 Sep 2018 13:05:36 +0000 (+0200) Subject: Fix build with --disable-ipv6 X-Git-Url: https://git.gsnw.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aa4a5f681ae39637d2a76ade6ea4b339a4963c0e;p=fping.git Fix build with --disable-ipv6 Otheriwse build breaks with: fping.c:690:24: error: ‘socket6’ undeclared (first use in this function); did you mean ‘socket4’? --- diff --git a/src/fping.c b/src/fping.c index 35edca4..414da2f 100644 --- a/src/fping.c +++ b/src/fping.c @@ -687,7 +687,11 @@ int main(int argc, char** argv) /* validate various option settings */ - if (socket4 < 0 && socket6 < 0) { + if (socket4 < 0 +#ifdef IPV6 + && socket6 < 0 +#endif + ) { crash_and_burn("can't create socket (must run as root?)"); }