[evas_sw] Fix loading of libary path 91/94291/2
authorJoogab Yun <joogab.yun@samsung.com>
Fri, 28 Oct 2016 05:29:09 +0000 (14:29 +0900)
committerjoogab yun <joogab.yun@samsung.com>
Tue, 1 Nov 2016 08:23:52 +0000 (01:23 -0700)
Change-Id: I7dbe81a9936cd7c58361a941a5dcf7a58911ceb1

src/modules/evas/engines/wayland_shm/evas_engine.c [changed mode: 0755->0644]

old mode 100755 (executable)
new mode 100644 (file)
index 256d901..6af1102
@@ -93,12 +93,12 @@ _symbols(void)
 {
    static int done = 0;
    int fail = 0;
-   const char *wayland_tbm_server_lib = "libwayland-tbm-server.so.0";
+   const char *wayland_tbm_server_lib = "/usr/lib/libwayland-tbm-server.so.0";
 
    if (done) return;
 
-#define LINK2GENERIC(sym)                     \
-   glsym_##sym = dlsym(RTLD_DEFAULT, #sym);   \
+#define LINK2GENERIC(lib, sym)                     \
+   glsym_##sym = dlsym(lib, #sym);   \
    if (!(glsym_##sym))                        \
      {                                        \
         ERR("%s", dlerror());                 \
@@ -106,7 +106,7 @@ _symbols(void)
      }
 
    // Get function pointer to native_common that is now provided through the link of SW_Generic.
-   LINK2GENERIC(evas_native_tbm_surface_image_set);
+   LINK2GENERIC(RTLD_DEFAULT, evas_native_tbm_surface_image_set);
    if (fail == 1)
      {
         ERR("fail to dlsym about evas_native_tbm_surface_image_set symbol");
@@ -115,7 +115,7 @@ _symbols(void)
    tbm_server_lib = dlopen(wayland_tbm_server_lib, RTLD_LOCAL | RTLD_LAZY);
    if (tbm_server_lib)
      {
-        LINK2GENERIC(wayland_tbm_server_get_surface);
+        LINK2GENERIC(tbm_server_lib, wayland_tbm_server_get_surface);
         if (fail == 1)
           {
              ERR("fail to dlsym about wayland_tbm_server_get_surface symbol");