From a1e0e816a99e4c5d24e12405dc79d4a95e521c7f Mon Sep 17 00:00:00 2001 From: Alex Yung Date: Mon, 7 Mar 2022 15:06:20 -0500 Subject: [PATCH] src: initialize libpath on z/OS Co-authored-by: Gaby Baghdadi Co-authored-by: Wayne Zhang Co-authored-by: Igor Todorovski --- src/node_main.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/node_main.cc b/src/node_main.cc index 6bac1075932587..1d9feec5958db0 100644 --- a/src/node_main.cc +++ b/src/node_main.cc @@ -96,6 +96,14 @@ int wmain(int argc, wchar_t* wargv[]) { #include #endif +#if defined(__MVS__) +#include "zos-setlibpath.h" + +// z/OS linker doesn't support rpath function, so we set LIBPATH in the source +// so libnode DLL can load. +__setlibpath libpath; +#endif + namespace node { namespace per_process { extern bool linux_at_secure;