Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src: include node_internals.h in node_metadata.cc #24933

Closed
wants to merge 1 commit into from

Conversation

danbev
Copy link
Contributor

@danbev danbev commented Dec 10, 2018

Currently, if configured --without-ssl the following compiler error will
be generated:

../src/node_metadata.cc:29:12:
error: use of undeclared identifier 'llhttp_version'
  llhttp = llhttp_version;
           ^
../src/node_metadata.cc:30:17:
error: use of undeclared identifier 'http_parser_version'
  http_parser = http_parser_version;

This commit includes the node_internals.h header so that
llhttp_version and http_parser_versions are always available.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

Currently, if configured --without-ssl the following compiler error will
be generated:
../src/node_metadata.cc:29:12:
error: use of undeclared identifier 'llhttp_version'
  llhttp = llhttp_version;
           ^
../src/node_metadata.cc:30:17:
error: use of undeclared identifier 'http_parser_version'
  http_parser = http_parser_version;

This commit includes the node_internals.h header so that
llhttp_version and http_parser_versions are always available.
@nodejs-github-bot nodejs-github-bot added the c++ Issues and PRs that require attention from people who are familiar with C++. label Dec 10, 2018
@danbev
Copy link
Contributor Author

danbev commented Dec 10, 2018

Copy link
Member

@bnoordhuis bnoordhuis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In case anyone else is confused why it worked with crypto enabled:

  1. node_metadata.cc includes node_crypto.h when defined(HAVE_OPENSSL)
  2. node_crypto.h includes async_wrap-inl.h
  3. async_wrap-inl.h includes node_internals.h

@bnoordhuis
Copy link
Member

CI failure is #24403.

Copy link
Member

@joyeecheung joyeecheung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM as a quick remedy, although I think we can simply move the definition of crypto::GetOpenSSLVersion here as it's not used elsewhere? Then all we need is openssl/opensslv.h here.

@addaleax
Copy link
Member

@addaleax addaleax added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Dec 10, 2018
@Trott
Copy link
Member

Trott commented Dec 10, 2018

Resume Build CI: https://ci.nodejs.org/job/node-test-pull-request/19394/ ✔️

@danbev
Copy link
Contributor Author

danbev commented Dec 13, 2018

Landed in 549761e.

@danbev danbev closed this Dec 13, 2018
@danbev danbev deleted the metadata_include_node_internals branch December 13, 2018 04:43
danbev added a commit that referenced this pull request Dec 13, 2018
Currently, if configured --without-ssl the following compiler error will
be generated:
../src/node_metadata.cc:29:12:
error: use of undeclared identifier 'llhttp_version'
  llhttp = llhttp_version;
           ^
../src/node_metadata.cc:30:17:
error: use of undeclared identifier 'http_parser_version'
  http_parser = http_parser_version;

This commit includes the node_internals.h header so that
llhttp_version and http_parser_versions are always available.

PR-URL: #24933
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
BethGriggs pushed a commit that referenced this pull request Dec 17, 2018
Currently, if configured --without-ssl the following compiler error will
be generated:
../src/node_metadata.cc:29:12:
error: use of undeclared identifier 'llhttp_version'
  llhttp = llhttp_version;
           ^
../src/node_metadata.cc:30:17:
error: use of undeclared identifier 'http_parser_version'
  http_parser = http_parser_version;

This commit includes the node_internals.h header so that
llhttp_version and http_parser_versions are always available.

PR-URL: #24933
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
@BethGriggs BethGriggs mentioned this pull request Dec 18, 2018
refack pushed a commit to refack/node that referenced this pull request Jan 14, 2019
Currently, if configured --without-ssl the following compiler error will
be generated:
../src/node_metadata.cc:29:12:
error: use of undeclared identifier 'llhttp_version'
  llhttp = llhttp_version;
           ^
../src/node_metadata.cc:30:17:
error: use of undeclared identifier 'http_parser_version'
  http_parser = http_parser_version;

This commit includes the node_internals.h header so that
llhttp_version and http_parser_versions are always available.

PR-URL: nodejs#24933
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. c++ Issues and PRs that require attention from people who are familiar with C++.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants