packages/net/fping/patches/010-ipv6.patch
Rosen Penev afbe8536f4
fping: update to 4.3
Fixes compilation with GCC 10.

Backported upstream patch to fix compilation without IPv6.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-07-17 15:12:16 -07:00

38 lines
1 KiB
Diff
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

From 54e97d9e393e375820e9c6ca0a56c7a4092ea5de Mon Sep 17 00:00:00 2001
From: Lars Wendler <polynomial-c@gentoo.org>
Date: Sun, 12 Jul 2020 13:55:44 +0200
Subject: [PATCH] Fix build with --disable-ipv6
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Otherwise build breaks with:
fping.c:399:14: error: ident6 undeclared (first use in this function); did you mean ident4?
399 | ident4 = ident6 = getpid() & 0xFFFF;
| ^~~~~~
| ident4
Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
---
src/fping.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/fping.c b/src/fping.c
index 3522123..4304531 100644
--- a/src/fping.c
+++ b/src/fping.c
@@ -258,12 +258,12 @@ HOST_ENTRY* ev_last;
char* prog;
int ident4 = 0; /* our icmp identity field */
+int ident6 = 0;
int socket4 = -1;
int using_sock_dgram4 = 0;
#ifndef IPV6
int hints_ai_family = AF_INET;
#else
-int ident6 = 0;
int socket6 = -1;
int hints_ai_family = AF_UNSPEC;
#endif