From bd30f9451a3f775e7db30a9c405e4db9d4c259b8 Mon Sep 17 00:00:00 2001 From: Dmitry Kozlov Date: Tue, 3 Jun 2014 21:43:27 +0400 Subject: get out of SPINLOCK_INITIALIZER as it is not cross-platform compatible --- accel-pppd/memdebug.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'accel-pppd/memdebug.c') diff --git a/accel-pppd/memdebug.c b/accel-pppd/memdebug.c index 1f4af36..4b37400 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); } -- cgit v1.2.3