From aa4a5f681ae39637d2a76ade6ea4b339a4963c0e Mon Sep 17 00:00:00 2001 From: Lars Wendler Date: Tue, 18 Sep 2018 15:05:36 +0200 Subject: [PATCH] Fix build with --disable-ipv6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Otheriwse build breaks with: fping.c:690:24: error: ‘socket6’ undeclared (first use in this function); did you mean ‘socket4’? --- src/fping.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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?)"); }