From 3b6112da64afcf8dee3ac6a49d82d0e9e60bd807 Mon Sep 17 00:00:00 2001 From: MatthewColegate Date: Mon, 28 Nov 2016 15:46:27 +0000 Subject: [PATCH] Allow loading from AIX .a shared libraries --- binding.gyp | 2 +- src/ibmras/monitoring/agent/Agent.cpp | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/binding.gyp b/binding.gyp index 4d9159e..a0147ce 100644 --- a/binding.gyp +++ b/binding.gyp @@ -49,7 +49,7 @@ "conditions": [ ['OS=="aix"', { "defines": [ "_AIX", "AIX" ], - "libraries": [ "-Wl,-bexpall,-brtllib,-G,-bernotok,-brtl" ], + "libraries": [ "-Wl,-bexpall,-brtllib,-G,-bernotok,-brtl,-L.,-bnoipath" ], }], ['OS=="mac"', { "defines": [ "__MACH__", "__APPLE__", ], diff --git a/src/ibmras/monitoring/agent/Agent.cpp b/src/ibmras/monitoring/agent/Agent.cpp index 4f73809..2c51f01 100644 --- a/src/ibmras/monitoring/agent/Agent.cpp +++ b/src/ibmras/monitoring/agent/Agent.cpp @@ -43,8 +43,12 @@ const char* LIBSUFFIX = ".dll"; #define AGENT_DECL const char PATHSEPARATOR = '/'; const char* LIBPREFIX = "lib"; +#if defined(AIX) +const char* LIBSUFFIX = ".a"; +#else const char* LIBSUFFIX = ".so"; #endif +#endif namespace ibmras {