Skip to content

Commit

Permalink
Applying spack-ized versions of fix in nodejs/node#52223 to adddress …
Browse files Browse the repository at this point in the history
…CI failures

Signed-off-by: Teague Sterling <[email protected]>
  • Loading branch information
teaguesterling committed Jul 7, 2024
1 parent fe7c7fd commit 83b7c89
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
diff --git a/deps/cares/config/linux/ares_config.h~ b/deps/cares/config/linux/ares_config.h
index 3cb135a..88934ad 100644
--- a/deps/cares/config/linux/ares_config.h~
+++ b/deps/cares/config/linux/ares_config.h
@@ -116,7 +116,7 @@
#define HAVE_GETNAMEINFO 1

/* Define to 1 if you have `getrandom` */
-#define HAVE_GETRANDOM 1
+#define HAVE_GETRANDOM 0

/* Define to 1 if you have `getservbyport_r` */
#define HAVE_GETSERVBYPORT_R 1
@@ -329,7 +329,7 @@
#define HAVE_SYS_PARAM_H 1

/* Define to 1 if you have the <sys/random.h> header file. */
-#define HAVE_SYS_RANDOM_H 1
+#define HAVE_SYS_RANDOM_H 0

/* Define to 1 if you have the <sys/select.h> header file. */
#define HAVE_SYS_SELECT_H 1
@@ -570,4 +570,4 @@
/* #undef _LARGE_FILES */

/* Define to `unsigned int' if <sys/types.h> does not define. */
-/* #undef size_t */
\ No newline at end of file
+/* #undef size_t */
3 changes: 3 additions & 0 deletions var/spack/repos/builtin/packages/node-js/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ class NodeJs(Package):
"%gcc@14:", when="@:19", msg="fails to build with gcc 14+ due to implicit conversions"
)

# See https://github.com/nodejs/node/issues/52223
patch("fix-old-glibc-random-headers.patch", when="^glibc@:2.24")

def setup_build_environment(self, env):
# Force use of experimental Python 3 support
env.set("PYTHON", self.spec["python"].command.path)
Expand Down

0 comments on commit 83b7c89

Please sign in to comment.