Support 64bit plugin 44/289344/1 accepted/tizen/unified/20230307.101620
authorsangwook lee <sangwook96.lee@samsung.com>
Mon, 6 Mar 2023 10:06:17 +0000 (19:06 +0900)
committersangwook lee <sangwook96.lee@samsung.com>
Mon, 6 Mar 2023 10:06:17 +0000 (19:06 +0900)
Change-Id: Ieb9c51d475ba7d6d5f2f5d78488579798d5becf9
Signed-off-by: sangwook lee <sangwook96.lee@samsung.com>
src/plugin.c
src/plugin.h

index 2efe7d25160dc92520bbdb18a7c6bb3b2930f5dd..222e9e38399c040de466ef9b45df53ad7af243e4 100755 (executable)
@@ -91,8 +91,15 @@ static int load_plugin_not_default()
     plugin_init_proc = NULL;
     plugin_sync_proc = NULL;
     plugin_async_proc = NULL;
+    void* void_pointer;
+    if ((int)(sizeof(void_pointer)) == 8) {
+        g_plugin_handle = dlopen ( PLUGIN_PATH64, RTLD_NOW );
+    }
+    else {
+        g_plugin_handle = dlopen ( PLUGIN_PATH, RTLD_NOW );
+    }
 
-    g_plugin_handle = dlopen ( PLUGIN_PATH, RTLD_NOW );
+    //g_plugin_handle = dlopen ( PLUGIN_PATH, RTLD_NOW );
     if ( g_plugin_handle == NULL ) {
         E ( "failed to dlopen(%s). error: %s\n", PLUGIN_PATH, dlerror() );
         return 0;
@@ -736,4 +743,4 @@ int request_extra_capability_to_plugin (char* out_buf, unsigned int out_len )
     }
 
     return success;
-}
\ No newline at end of file
+}
index 72345c6cf4f28f77f5befd393c61382984fd14f2..29dfde254b00c0a875e40b28712483aac2dccb2a 100755 (executable)
@@ -20,6 +20,8 @@
 #include "sdbd_plugin.h"
 
 #define PLUGIN_PATH        "/usr/lib/libsdbd_plugin.so"
+#define PLUGIN_PATH64      "/usr/lib64/libsdbd_plugin.so"
+
 #define PLUGIN_XML_PATH    "/etc/sdbd/commands.xml"
 
 extern char* extcmd;