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/extra/ipv6pool.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'accel-pppd/extra') diff --git a/accel-pppd/extra/ipv6pool.c b/accel-pppd/extra/ipv6pool.c index 5a9dde9..9db7b40 100644 --- a/accel-pppd/extra/ipv6pool.c +++ b/accel-pppd/extra/ipv6pool.c @@ -31,7 +31,7 @@ struct dppool_item_t static LIST_HEAD(ippool); static LIST_HEAD(dppool); -static spinlock_t pool_lock = SPINLOCK_INITIALIZER; +static spinlock_t pool_lock; static struct ipdb_t ipdb; static void generate_ippool(struct in6_addr *addr, int mask, int prefix_len) @@ -190,7 +190,9 @@ static void ippool_init(void) { struct conf_sect_t *s = conf_get_section("ipv6-pool"); struct conf_option_t *opt; - + + spinlock_init(&pool_lock); + if (!s) return; -- cgit v1.2.3