Skip to content

Commit

Permalink
Subject: [PATCH] AI_V4MAPPED macro is missing on some platforms, e.g.…
Browse files Browse the repository at this point in the history
… OpenBSD, NetBSD, etc.
  • Loading branch information
leleliu008 authored and lws-team committed Aug 29, 2024
1 parent c980be7 commit f69835e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/core-net/client/connect2.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
#include <netdb.h>
#endif

#ifndef AI_V4MAPPED
#define AI_V4MAPPED 0
#endif

#if !defined(LWS_WITH_SYS_ASYNC_DNS)
static int
lws_getaddrinfo46(struct lws *wsi, const char *ads, struct addrinfo **result)
Expand All @@ -49,9 +53,7 @@ lws_getaddrinfo46(struct lws *wsi, const char *ads, struct addrinfo **result)

#if !defined(__ANDROID__)
hints.ai_family = AF_UNSPEC;
#if !defined(__OpenBSD__) && !defined(__OPENBSD)
hints.ai_flags = AI_V4MAPPED;
#endif
#endif
} else
#endif
Expand Down

0 comments on commit f69835e

Please sign in to comment.