From 2ce08cfe1d029af8c9db70385da1bdde1382901d Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Thu, 13 May 2021 15:53:52 +0200 Subject: [PATCH] src: update cares_wrap OpenBSD defines Move the `#define`s back into `cares_wrap.cc`, as they are part of the implementation, not the declarations used in `cares_wrap.h`, and apply the suggestion from https://github.com/nodejs/node/pull/38572#discussion_r627809407 to make the defines a bit more generic and not check for OpenBSD specifically. Refs: https://github.com/nodejs/node/pull/38572 PR-URL: https://github.com/nodejs/node/pull/38670 Reviewed-By: Richard Lau Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Rich Trott --- src/cares_wrap.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/cares_wrap.cc b/src/cares_wrap.cc index e21fc2e303897f..58bfea1b30dbfd 100644 --- a/src/cares_wrap.cc +++ b/src/cares_wrap.cc @@ -49,7 +49,11 @@ # include #endif -#if defined(__OpenBSD__) +// OpenBSD does not define these +#ifndef AI_ALL +# define AI_ALL 0 +#endif +#ifndef AI_V4MAPPED # define AI_V4MAPPED 0 #endif