Examples: make global vars static to avoid symbol conflicts

Segfault due to the 'socket' symbol referring to the variable instead of
the actual libc socket() function:

#0  0x0000aaaaaaac0040 in socket ()
#1  0x0000fffff723c698 in g_socket (domain=1, type=1, protocol=0, error=error@entry=0xffffe6ed79b8) at ../gio/gsocket.c:647

(how was this not caught before? o.0)
This commit is contained in:
Val Packett 2026-04-13 03:30:32 -03:00
parent 96f1fd8080
commit d4211d8d1e
2 changed files with 3 additions and 3 deletions

View file

@ -2,7 +2,7 @@
#include "casilda-compositor.h"
/* Do not listen on any socket by default */
gchar *socket = NULL;
static gchar *socket = NULL;
static void

View file

@ -2,8 +2,8 @@
#include "casilda-compositor.h"
/* Do not listen on any socket by default */
gchar *socket = NULL;
gchar *dirname;
static gchar *socket = NULL;
static gchar *dirname;
static void