netresolv: Add support for AI_V4MAPPED in ai_flags in getaddrinfo

Ports over the following commits from FreeBSD:
https://github.com/freebsd/freebsd-src/commit/b848a37d4eddb432629a799713cf6fb6f0fd8c3c
https://github.com/freebsd/freebsd-src/commit/2cff354f1a56af10ad02164a9ee38c013ac80688

Fixes #14323.

Change-Id: I40e6f0ee132eb2d17d8ec66ba0e28566e8695d18
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10358
Haiku-Format: Haiku-format Bot <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
This commit is contained in:
vighnesh-sawant
2026-02-26 11:08:16 +00:00
committed by Jérôme Duval
parent 763cfd171b
commit 902921a554
5 changed files with 271 additions and 53 deletions
+3 -3
View File
@@ -83,9 +83,9 @@ const char *hstrerror(int);
#define AI_ADDRCONFIG 0x00000400
#define AI_V4MAPPED 0x00000800
#define AI_MASK \
(AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST | AI_NUMERICSERV | AI_ADDRCONFIG)
#define AI_MASK \
(AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST | AI_NUMERICSERV | AI_ADDRCONFIG | AI_ALL \
| AI_V4MAPPED)
/* getnameinfo */
#if defined(_DEFAULT_SOURCE)