Skip to content

Commit

Permalink
src: update cares_wrap OpenBSD defines
Browse files Browse the repository at this point in the history
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
#38572 (comment)
to make the defines a bit more generic and not check for OpenBSD
specifically.

Refs: #38572

PR-URL: #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>
addaleax authored and targos committed May 18, 2021
1 parent fbf02e3 commit 524a9d6
Showing 2 changed files with 13 additions and 8 deletions.
13 changes: 13 additions & 0 deletions src/cares_wrap.cc
Original file line number Diff line number Diff line change
@@ -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 {

8 changes: 0 additions & 8 deletions src/cares_wrap.h
Original file line number Diff line number Diff line change
@@ -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 {

0 comments on commit 524a9d6

Please sign in to comment.