From e4b1d5d7269caa4a93d3d23d0d91b6ca49957998 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Tue, 14 Oct 2008 17:30:07 +0000 Subject: [PATCH] mmap portability changes by Spry --- libtransmission/platform.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libtransmission/platform.c b/libtransmission/platform.c index d7a303dfb..e6242ad93 100644 --- a/libtransmission/platform.c +++ b/libtransmission/platform.c @@ -637,7 +637,11 @@ tr_lockfile( const char * filename ) * his paper at: http://www.genesys-e.de/jwalter/mix4win.htm */ +#if defined(_MSC_VER) +__declspec( align( 4 ) ) static LONG volatile g_sl; +#else static LONG volatile g_sl __attribute__ ( ( aligned ( 4 ) ) ); +#endif /* Wait for spin lock */ static int @@ -651,7 +655,7 @@ slwait( LONG volatile *sl ) /* Release spin lock */ static int -slrelease( LONG *sl ) +slrelease( LONG volatile *sl ) { InterlockedExchange ( sl, 0 ); return 0;