summaryrefslogtreecommitdiff
path: root/accel-pppd/session.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/session.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/session.c')
-rw-r--r--accel-pppd/session.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/accel-pppd/session.c b/accel-pppd/session.c
index 267b960f..d8ee6dd8 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");