mirror of https://github.com/MidnightCommander/mc
x11: fix `-Wdeprecated-declarations` for `g_module_build_path`
``` x11conn.c:140:5: warning: 'g_module_build_path' is deprecated [-Wdeprecated-declarations] 140 | x11_module_fname = g_module_build_path (NULL, "X11"); | ^~~~~~~~~~~~~~~~ ``` Reported-by: David Martín <dhmartina@yahoo.es> Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
This commit is contained in:
parent
61267796e2
commit
ad96349c91
|
@ -129,21 +129,16 @@ static gboolean
|
|||
x11_available (void)
|
||||
{
|
||||
#ifdef HAVE_GMODULE
|
||||
gchar *x11_module_fname;
|
||||
|
||||
if (lost_connection)
|
||||
return FALSE;
|
||||
|
||||
if (x11_module != NULL)
|
||||
return TRUE;
|
||||
|
||||
x11_module_fname = g_module_build_path (NULL, "X11");
|
||||
x11_module = g_module_open (x11_module_fname, G_MODULE_BIND_LAZY);
|
||||
x11_module = g_module_open ("X11", G_MODULE_BIND_LAZY);
|
||||
if (x11_module == NULL)
|
||||
x11_module = g_module_open ("libX11.so.6", G_MODULE_BIND_LAZY);
|
||||
|
||||
g_free (x11_module_fname);
|
||||
|
||||
if (x11_module == NULL)
|
||||
return FALSE;
|
||||
|
||||
|
|
Loading…
Reference in New Issue