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>
  • Loading branch information
addaleax authored and richardlau committed Jul 23, 2021
1 parent 6ac4a9b commit 2ce08cf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/cares_wrap.cc
Expand Up @@ -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

Expand Down

0 comments on commit 2ce08cf

Please sign in to comment.