The library path is not "/usr/lib" in 64-bit env. This patch defines
the library path in the compilation time.
Change-Id: Ia328ef9b8f77e3e5f1839ac571b2880670c0d573
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
ADD_DEFINITIONS("-DAPPSVC_DB_VERSION=\"${APPSVC_DB_VERSION}\"")
ADD_DEFINITIONS("-DCOMPONENT_DB_VERSION=\"${COMPONENT_DB_VERSION}\"")
+ADD_DEFINITIONS("-DLIBDIR=\"${LIBDIR}\"")
## Compile flags
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wl,-zdefs -fvisibility=hidden -g -Wall -Werror -fpic ")
namespace boot_sequencer {
namespace {
-constexpr const char LIBCERT_SVC_VCORE[] = "/usr/lib/libcert-svc-vcore.so.2";
+constexpr const char LIBCERT_SVC_VCORE[] = "libcert-svc-vcore.so.2";
typedef struct {
void* privatePtr;
}
void Init() {
- void* handle = dlopen(LIBCERT_SVC_VCORE, RTLD_LAZY | RTLD_LOCAL);
+ std::string path = std::string(LIBDIR) + "/" +
+ std::string(LIBCERT_SVC_VCORE);
+ void* handle = dlopen(path.c_str(), RTLD_LAZY | RTLD_LOCAL);
if (handle == nullptr) {
_E("dlopen() is failed. error(%s)", dlerror());
return;