mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-18 05:53:36 +01:00
ping: low-effort fix to make it compilable without inet
This commit is contained in:
parent
55e0aefae6
commit
cea9f49f82
@ -125,6 +125,10 @@ pfsync_syncpeer_nvlist_to_sockaddr(const nvlist_t *nvl,
|
||||
{
|
||||
int af;
|
||||
|
||||
#if (!defined INET && !defined INET6)
|
||||
(void)sa;
|
||||
#endif
|
||||
|
||||
if (!nvlist_exists_number(nvl, "af"))
|
||||
return (EINVAL);
|
||||
if (!nvlist_exists_binary(nvl, "address"))
|
||||
|
@ -213,7 +213,9 @@ setvxlan_local(if_ctx *ctx, const char *addr, int dummy __unused)
|
||||
{
|
||||
struct ifvxlancmd cmd;
|
||||
struct addrinfo *ai;
|
||||
#if (defined INET || defined INET6)
|
||||
struct sockaddr *sa;
|
||||
#endif
|
||||
int error;
|
||||
|
||||
bzero(&cmd, sizeof(cmd));
|
||||
@ -222,7 +224,9 @@ setvxlan_local(if_ctx *ctx, const char *addr, int dummy __unused)
|
||||
errx(1, "error in parsing local address string: %s",
|
||||
gai_strerror(error));
|
||||
|
||||
#if (defined INET || defined INET6)
|
||||
sa = ai->ai_addr;
|
||||
#endif
|
||||
|
||||
switch (ai->ai_family) {
|
||||
#ifdef INET
|
||||
@ -273,7 +277,9 @@ setvxlan_remote(if_ctx *ctx, const char *addr, int dummy __unused)
|
||||
{
|
||||
struct ifvxlancmd cmd;
|
||||
struct addrinfo *ai;
|
||||
#if (defined INET || defined INET6)
|
||||
struct sockaddr *sa;
|
||||
#endif
|
||||
int error;
|
||||
|
||||
bzero(&cmd, sizeof(cmd));
|
||||
@ -282,7 +288,9 @@ setvxlan_remote(if_ctx *ctx, const char *addr, int dummy __unused)
|
||||
errx(1, "error in parsing remote address string: %s",
|
||||
gai_strerror(error));
|
||||
|
||||
#if (defined INET || defined INET6)
|
||||
sa = ai->ai_addr;
|
||||
#endif
|
||||
|
||||
switch (ai->ai_family) {
|
||||
#ifdef INET
|
||||
@ -333,7 +341,9 @@ setvxlan_group(if_ctx *ctx, const char *addr, int dummy __unused)
|
||||
{
|
||||
struct ifvxlancmd cmd;
|
||||
struct addrinfo *ai;
|
||||
#if (defined INET || defined INET6)
|
||||
struct sockaddr *sa;
|
||||
#endif
|
||||
int error;
|
||||
|
||||
bzero(&cmd, sizeof(cmd));
|
||||
@ -342,7 +352,9 @@ setvxlan_group(if_ctx *ctx, const char *addr, int dummy __unused)
|
||||
errx(1, "error in parsing group address string: %s",
|
||||
gai_strerror(error));
|
||||
|
||||
#if (defined INET || defined INET6)
|
||||
sa = ai->ai_addr;
|
||||
#endif
|
||||
|
||||
switch (ai->ai_family) {
|
||||
#ifdef INET
|
||||
|
Loading…
Reference in New Issue
Block a user