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:
parent
96f1fd8080
commit
d4211d8d1e
2 changed files with 3 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue