From 1bf492af08ce8a60818d62a5d4fb627e366dcd35 Mon Sep 17 00:00:00 2001 From: leleliu008 Date: Mon, 2 Sep 2024 15:53:47 +0800 Subject: [PATCH] ice: AI_V4MAPPED macro is missing on some BSD systems (#1181) --- src/ice/icesdp.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/ice/icesdp.c b/src/ice/icesdp.c index 1917ff327..953d646f9 100644 --- a/src/ice/icesdp.c +++ b/src/ice/icesdp.c @@ -209,10 +209,11 @@ static int getaddr_rcand(void *arg) { struct rcand *rcand = arg; struct addrinfo *res, *res0 = NULL; -#ifndef OPENBSD - struct addrinfo hints = {.ai_flags = AI_V4MAPPED | AI_ADDRCONFIG, -#else + +#if defined(OPENBSD) || defined(__NetBSD__) struct addrinfo hints = {.ai_flags = AI_ADDRCONFIG, +#else + struct addrinfo hints = {.ai_flags = AI_ADDRCONFIG | AI_V4MAPPED, #endif .ai_family = rcand->ai_family}; int err;