Skip to content

Commit 8809ef9

Browse files
addaleaxtargos
authored andcommitted
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 #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>
1 parent d66f88c commit 8809ef9

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

src/cares_wrap.cc

+13
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,19 @@
3838
#include <vector>
3939
#include <unordered_set>
4040

41+
#ifndef T_CAA
42+
# define T_CAA 257 /* Certification Authority Authorization */
43+
#endif
44+
45+
// OpenBSD does not define these
46+
#ifndef AI_ALL
47+
# define AI_ALL 0
48+
#endif
49+
#ifndef AI_V4MAPPED
50+
# define AI_V4MAPPED 0
51+
#endif
52+
53+
4154
namespace node {
4255
namespace cares_wrap {
4356

src/cares_wrap.h

-8
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,6 @@
3232
# include <arpa/nameser.h>
3333
#endif
3434

35-
#ifndef T_CAA
36-
# define T_CAA 257 /* Certification Authority Authorization */
37-
#endif
38-
39-
#if defined(__OpenBSD__)
40-
# define AI_V4MAPPED 0
41-
#endif
42-
4335
namespace node {
4436
namespace cares_wrap {
4537

0 commit comments

Comments
 (0)