diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2014-06-03 21:43:27 +0400 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2014-06-03 21:43:27 +0400 |
commit | bd30f9451a3f775e7db30a9c405e4db9d4c259b8 (patch) | |
tree | 9700f1cc1c1a12c658e51176dd928a2a675d6a21 /accel-pppd/extra | |
parent | 093c53e3e08abb609cae6e58b1b438616c57c17f (diff) | |
download | accel-ppp-xebd-bd30f9451a3f775e7db30a9c405e4db9d4c259b8.tar.gz accel-ppp-xebd-bd30f9451a3f775e7db30a9c405e4db9d4c259b8.zip |
get out of SPINLOCK_INITIALIZER as it is not cross-platform compatible
Diffstat (limited to 'accel-pppd/extra')
-rw-r--r-- | accel-pppd/extra/ipv6pool.c | 6 |
1 files changed, 4 insertions, 2 deletions
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; |