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/session.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'accel-pppd/session.c') diff --git a/accel-pppd/session.c b/accel-pppd/session.c index 267b960..d8ee6dd 100644 --- a/accel-pppd/session.c +++ b/accel-pppd/session.c @@ -43,7 +43,7 @@ int __export urandom_fd; int __export ap_shutdown; #if __WORDSIZE == 32 -static spinlock_t seq_lock = SPINLOCK_INITIALIZER; +static spinlock_t seq_lock; #endif static long long unsigned seq; static struct timespec seq_ts; @@ -419,6 +419,10 @@ static void init(void) { FILE *f; +#if __WORDSIZE == 32 + spinlock_init(&seq_lock); +#endif + sock_fd = socket(AF_INET, SOCK_DGRAM, 0); if (sock_fd < 0) { perror("socket"); -- cgit v1.2.3