summaryrefslogtreecommitdiff
path: root/accel-pppd/memdebug.c
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2014-06-03 21:43:27 +0400
committerDmitry Kozlov <xeb@mail.ru>2014-06-03 21:43:27 +0400
commitbd30f9451a3f775e7db30a9c405e4db9d4c259b8 (patch)
tree9700f1cc1c1a12c658e51176dd928a2a675d6a21 /accel-pppd/memdebug.c
parent093c53e3e08abb609cae6e58b1b438616c57c17f (diff)
downloadaccel-ppp-bd30f9451a3f775e7db30a9c405e4db9d4c259b8.tar.gz
accel-ppp-bd30f9451a3f775e7db30a9c405e4db9d4c259b8.zip
get out of SPINLOCK_INITIALIZER as it is not cross-platform compatible
Diffstat (limited to 'accel-pppd/memdebug.c')
-rw-r--r--accel-pppd/memdebug.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/accel-pppd/memdebug.c b/accel-pppd/memdebug.c
index 1f4af364..4b374008 100644
--- a/accel-pppd/memdebug.c
+++ b/accel-pppd/memdebug.c
@@ -40,7 +40,7 @@ struct mem_t
};
static LIST_HEAD(mem_list);
-static spinlock_t mem_list_lock = SPINLOCK_INITIALIZER;
+static spinlock_t mem_list_lock;
static struct mem_t *_md_malloc(size_t size, const char *fname, int line)
{
@@ -242,6 +242,8 @@ void __export md_check(void *ptr)
static void __init init(void)
{
+ spinlock_init(&mem_list_lock);
+
signal(36, siginfo);
signal(37, siginfo2);
}