mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-10 14:52:00 +00:00
Fall back to libcurl.so.4 or libcurl.so.4 if the default symlink does not exist.
This commit is contained in:
parent
1f86aba342
commit
a99634c2d3
1 changed files with 20 additions and 5 deletions
|
@ -100,6 +100,19 @@ qboolean CL_cURL_Init()
|
||||||
return qfalse;
|
return qfalse;
|
||||||
#else
|
#else
|
||||||
char fn[1024];
|
char fn[1024];
|
||||||
|
|
||||||
|
// On some linux distributions there is no libcurl.so symlink, but only libcurl.so.4
|
||||||
|
|
||||||
|
Q_strncpyz(fn, cl_cURLLib->string, sizeof(fn));
|
||||||
|
strncat(fn, ".4", sizeof(fn)-strlen(fn)-1);
|
||||||
|
|
||||||
|
if((cURLLib = Sys_LoadLibrary(fn)) == 0)
|
||||||
|
{
|
||||||
|
Q_strncpyz(fn, cl_cURLLib->string, sizeof(fn));
|
||||||
|
strncat(fn, ".3", sizeof(fn)-strlen(fn)-1);
|
||||||
|
|
||||||
|
if((cURLLib = Sys_LoadLibrary(fn)) == 0)
|
||||||
|
{
|
||||||
Q_strncpyz( fn, Sys_Cwd( ), sizeof( fn ) );
|
Q_strncpyz( fn, Sys_Cwd( ), sizeof( fn ) );
|
||||||
strncat(fn, "/", sizeof(fn)-strlen(fn)-1);
|
strncat(fn, "/", sizeof(fn)-strlen(fn)-1);
|
||||||
strncat(fn, cl_cURLLib->string, sizeof(fn)-strlen(fn)-1);
|
strncat(fn, cl_cURLLib->string, sizeof(fn)-strlen(fn)-1);
|
||||||
|
@ -108,6 +121,8 @@ qboolean CL_cURL_Init()
|
||||||
{
|
{
|
||||||
return qfalse;
|
return qfalse;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
#endif /* _WIN32 */
|
#endif /* _WIN32 */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue