diff options
author | Anna Henningsen <anna@addaleax.net> | 2021-05-13 16:53:52 +0300 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2021-05-17 19:02:33 +0300 |
commit | 75340f3c524cbe8602ba8f5a48b8bf8572bad8f1 (patch) | |
tree | 8ca7f27c25289d9d0913388c5aa82c07bc77eb85 /src | |
parent | 3ee1f9a29a6b18da79ac96c7e5e80f2933dfe2fb (diff) |
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 <rlau@redhat.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/cares_wrap.cc | 13 | ||||
-rw-r--r-- | src/cares_wrap.h | 8 |
2 files changed, 13 insertions, 8 deletions
diff --git a/src/cares_wrap.cc b/src/cares_wrap.cc index c0368739ff0..1b8639fa03f 100644 --- a/src/cares_wrap.cc +++ b/src/cares_wrap.cc @@ -38,6 +38,19 @@ #include <vector> #include <unordered_set> +#ifndef T_CAA +# define T_CAA 257 /* Certification Authority Authorization */ +#endif + +// OpenBSD does not define these +#ifndef AI_ALL +# define AI_ALL 0 +#endif +#ifndef AI_V4MAPPED +# define AI_V4MAPPED 0 +#endif + + namespace node { namespace cares_wrap { diff --git a/src/cares_wrap.h b/src/cares_wrap.h index 20d350a7632..27322367556 100644 --- a/src/cares_wrap.h +++ b/src/cares_wrap.h @@ -32,14 +32,6 @@ # include <arpa/nameser.h> #endif -#ifndef T_CAA -# define T_CAA 257 /* Certification Authority Authorization */ -#endif - -#if defined(__OpenBSD__) -# define AI_V4MAPPED 0 -#endif - namespace node { namespace cares_wrap { |