Update cares_wrap.cc#38572
Conversation
PR-URL: #38003 Reviewed-By: Jan Krems <jan.krems@gmail.com>
Main goal of using a GitHub Action for labelling PRs has been to move the mapping between files changed -> label into a configuration file local to the nodejs/node repository. Previously any changes to that mapping meant having to grasp the nodejs/github-bot project, open a PR with the neccessary changes, get approval from its maintainers before those changes finally got pushed to production. The logic involved in using the file paths / label configuration and resolving the labels to be applied, has been moved into a custom GitHub Action project: nodejs/node-pr-labeler. Aside from removing the external dependency the nodejs-github-bot is in practise, it also reduces the bar for contributors since the resulting project is a lot smaller and less complex than nodejs/github-bot. PR-URL: #38301 Fixes: nodejs/github-bot#294 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
PR-URL: #38399 Reviewed-By: Zijian Liu <lxxyxzj@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
OpenBSD does not define AI_ALL.
| #if defined(__OpenBSD__) | ||
| # define AI_ALL 0 | ||
| # define AI_V4MAPPED 0 |
There was a problem hiding this comment.
Obviously, this was this way before, but I'm wondering why we're not doing
| #if defined(__OpenBSD__) | |
| # define AI_ALL 0 | |
| # define AI_V4MAPPED 0 | |
| // OpenBSD does not define these | |
| #ifndef AI_ALL | |
| #define AI_ALL 0 | |
| #endif | |
| #ifndef AI_V4MAPPED | |
| #define AI_V4MAPPED 0 |
which seems just a bit more future-proof (because OpenBSD might add support at some point) and flexible (because what if there's other OSes that also don't have these)?
There was a problem hiding this comment.
Looks good to me. From what I can tell, that change should apply to 14.x as well, no?
There was a problem hiding this comment.
@VlkrS Err… yeah, I just noticed that this PR was opened against v12.x. Is there a reason for that? Typically changes are being made against the master branch first and then backported, unless there’s a reason not to.
There was a problem hiding this comment.
The current version in OpenBSD ports is 12.16.1 and I was trying to upgrade that (I'm just a user and not involved in the project), so my concern was mainly to get a more recent 12.x version to build on account of the numerous security patches.
I can confirm that with the current patches in the port and this fix, I get a clean build and as far as I can tell a working node environment on OpenBSD, but I have not even looked into building any later release branch, let alone MASTER yet, so I thought it'd be best to stick to the branch I've actually tested :-)
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 nodejs#38572 (comment) to make the defines a bit more generic and not check for OpenBSD specifically. Refs: nodejs#38572
|
PR for master: #38670 |
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>
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>
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>
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>
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>
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>
61c274b to
6ac4a9b
Compare
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>
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>
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>
OpenBSD does not define AI_ALL. Proposal is to treat the same as AI_4VMAPPED.