Skip to content

Commit 4a85a4b

Browse files
addaleaxguybedford
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 <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]>
1 parent b3c698a commit 4a85a4b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/cares_wrap.cc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,11 @@
4949
# include <arpa/nameser.h>
5050
#endif
5151

52-
#if defined(__OpenBSD__)
52+
// OpenBSD does not define these
53+
#ifndef AI_ALL
54+
# define AI_ALL 0
55+
#endif
56+
#ifndef AI_V4MAPPED
5357
# define AI_V4MAPPED 0
5458
#endif
5559

0 commit comments

Comments
 (0)