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>
This commit is contained in:
Anna Henningsen authored and Richard Lau committed 2021-07-26 16:30:43 +01:00
1 parent b3c698a5d8
commit 30ce0e66ae
1 file changed
+5 -1
+5 -1
View File
@@ -49,7 +49,11 @@
# include <arpa/nameser.h>
#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