Skip to content

Commit

Permalink
fixup: account for sys/random requirement that is not met by older gl…
Browse files Browse the repository at this point in the history
…ibc versions
  • Loading branch information
addaleax committed Mar 27, 2024
1 parent da16279 commit 06b7683
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 4 deletions.
11 changes: 9 additions & 2 deletions .evergreen/install-node.sh
Expand Up @@ -45,13 +45,20 @@ else
# needs to be built from source
if [[ "${DISTRO_ID}" =~ ^(amazon2-|rhel7|ubuntu18|suse12) ]] && [[ "$NODE_JS_VERSION" =~ ^20 ]];
then
bash "$BASEDIR/install-node-source.sh"
NODE_JS_SOURCE_VERSION="$NODE_JS_VERSION"
if echo $NODE_JS_VERSION | grep -q ^20 ; then
# Node.js 20.11.1 is the last 20.x that builds out of the box on RHEL7
# https://github.com/nodejs/node/issues/52223
NODE_JS_SOURCE_VERSION=20.11.1
fi
env NODE_JS_VERSION="$NODE_JS_SOURCE_VERSION" bash "$BASEDIR/install-node-source.sh"
nvm use $NODE_JS_SOURCE_VERSION
else
echo nvm install --no-progress $NODE_JS_VERSION && nvm alias default $NODE_JS_VERSION
nvm install --no-progress $NODE_JS_VERSION
nvm alias default $NODE_JS_VERSION
nvm use $NODE_JS_VERSION
fi
nvm use $NODE_JS_VERSION
set -x

if env PATH="/opt/chefdk/gitbin:$PATH" git --version | grep -q 'git version 1.'; then
Expand Down
4 changes: 2 additions & 2 deletions .evergreen/setup-env.sh
Expand Up @@ -13,8 +13,8 @@ if [ "$OS" != "Windows_NT" ]; then
echo "Setting NVM environment home: $NVM_DIR"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
set +x # nvm is very verbose
echo nvm use $NODE_JS_VERSION
nvm use $NODE_JS_VERSION
echo nvm use $NODE_JS_VERSION || nvm use 20.11.1
nvm use $NODE_JS_VERSION || nvm use 20.11.1 # see install-node.sh
set -x
export PATH="$NVM_BIN:$PATH"

Expand Down
@@ -0,0 +1,14 @@
diff --git a/deps/cares/config/linux/ares_config.h b/deps/cares/config/linux/ares_config.h
index 3cb135a35ca6..5940fcf2e007 100644
--- a/deps/cares/config/linux/ares_config.h
+++ b/deps/cares/config/linux/ares_config.h
@@ -329,7 +329,9 @@
#define HAVE_SYS_PARAM_H 1

/* Define to 1 if you have the <sys/random.h> header file. */
+#if defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 25
#define HAVE_SYS_RANDOM_H 1
+#endif

/* Define to 1 if you have the <sys/select.h> header file. */
#define HAVE_SYS_SELECT_H 1

0 comments on commit 06b7683

Please sign in to comment.