[Mono-dev] mono-semaphore.c broken on MacOSX in SVN
Geoff Norton
gnorton at novell.com
Tue Feb 23 19:56:09 EST 2010
This is fixed in trunk, sorry I forgot to commit it before.
-g
On 2010-02-23, at 7:46 PM, Tom Philpot wrote:
> Mono-semaphore.c won't compile on Mac.
>
> I *think* the patch below will fix it in both cases, but my macros are pretty rusty. Basically, semaphore_timedwait doesn't take a mach_timespec_t* where as sem_timedwait does take a struct timespec *
>
>
>
> ws1048-snow:mono tom.philpot$ svn diff mono/utils/mono-semaphore.c
> Index: mono/utils/mono-semaphore.c
> ===================================================================
> --- mono/utils/mono-semaphore.c (revision 152312)
> +++ mono/utils/mono-semaphore.c (working copy)
> @@ -17,7 +17,7 @@
> # define WAIT_BLOCK(a,b) semaphore_timedwait (a, b)
> # else
> # define TIMESPEC struct timespec
> -# define WAIT_BLOCK(a,b) sem_timedwait (a, b)
> +# define WAIT_BLOCK(a,b) sem_timedwait (a, &##b)
> # endif
>
> gboolean
> @@ -32,7 +32,7 @@
>
> tv.tv_sec = timeout_ms / 1000;
> tv.tv_nsec = (timeout_ms % 1000) * 1000000;
> - return (!WAIT_BLOCK (sem, &tv));
> + return (!WAIT_BLOCK (sem, tv));
> }
>
> #else
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
More information about the Mono-devel-list
mailing list