ecore-con: try to load libcurl.so.5 before .so.4
authorRaoul Hecky <raoul.hecky@gmail.com>
Fri, 24 Apr 2015 07:12:32 +0000 (09:12 +0200)
committerRaoul Hecky <raoul.hecky@gmail.com>
Fri, 24 Apr 2015 07:23:34 +0000 (09:23 +0200)
Curl is using a strange soname bumping where soname version is changed by configure when it detects some differences with off_t.
Explanations here: http://curl.haxx.se/dev/readme-curl_off_t.html

As we are not using curl_off_t in our code, we can simply load libcurl.so.5 if present.

src/lib/ecore_con/ecore_con_url.c

index 68b2a823ddad4148225cb2de4eae19b369667da6..b41cfb2fa01deb9a21c4367b76363e221f2b00e1 100644 (file)
@@ -309,13 +309,17 @@ _c_init(void)
          }                                    \
     }
 #if defined(_WIN32) || defined(__CYGWIN__)
+   LOAD("libcurl-5.dll"); // try correct dll first
    LOAD("libcurl-4.dll"); // try correct dll first
    LOAD("libcurl.dll"); // try 1
    LOAD("curllib.dll"); // if fail try 2
 #elif defined(__APPLE__) && defined(__MACH__)
+   LOAD("libcurl.5.dylib"); // try 1
    LOAD("libcurl.4.dylib"); // try 1
+   LOAD("libcurl.so.5"); // if fail try 2
    LOAD("libcurl.so.4"); // if fail try 2
 #else
+   LOAD("libcurl.so.5"); // try only
    LOAD("libcurl.so.4"); // try only
 #endif
    if (!_c->mod) goto error;