Skip to content

crypto: add missing rand.h includes#38864

Closed
codebytere wants to merge 1 commit intonodejs:masterfrom
codebytere:add-missing-include
Closed

crypto: add missing rand.h includes#38864
codebytere wants to merge 1 commit intonodejs:masterfrom
codebytere:add-missing-include

Conversation

@codebytere
Copy link
Copy Markdown
Member

@codebytere codebytere commented May 31, 2021

Before #35093 this include was explicitly there but it was remove in the refactor - without this Electron fails to compile with:

../../third_party/electron_node/src/crypto/crypto_util.cc:65:18: error: use of undeclared identifier 'RAND_status'
    int status = RAND_status();
                 ^
../../third_party/electron_node/src/crypto/crypto_util.cc:71:9: error: use of undeclared identifier 'RAND_poll'
    if (RAND_poll() == 0)
        ^
../../third_party/electron_node/src/crypto/crypto_util.cc:82:10: error: use of undeclared identifier 'RAND_bytes'
  return RAND_bytes(buffer, length) != -1;
         ^
3 errors generated.
ninja: build stopped: subcommand failed.

If there's another preferred approach let me know!

cc @jasnell

Loading
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++. crypto Issues and PRs related to the crypto subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants