Skip to content

Commit 30ce0e6

Browse files
addaleaxrichardlau
authored andcommittedJul 26, 2021
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 b3c698a commit 30ce0e6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed
 

Diff for: ‎src/cares_wrap.cc

+5-1
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)
Please sign in to comment.