[Mono-dev] Workaround for build failure on Linux

Robert Jordan robertj at gmx.net
Wed Mar 3 15:39:41 EST 2010

On 03.03.2010 20:07, Avery Pennarun wrote:
> On Wed, Mar 3, 2010 at 11:23 AM, Robert Jordan<robertj at gmx.net>  wrote:
>> On 03.03.2010 16:12, cpMon wrote:
>>> Here's a compile error from 2.6.1 and your latest svn tree:
>>> CC    io.lo
>>> In file included from ../../mono/io-layer/wapi.h:28,
>>>                    from io.c:32:
>>> ../../mono/io-layer/sockets.h:85: error: conflicting types for ‘close’
>>> /usr/include/unistd.h:350: note: previous declaration of ‘close’ was here
>> Hmm, this error does not match any existing code. Neither 2-6 nor
>> trunk redefines close(). At sockets.h:85 there is only closesocket(),
>> and it sits there since years.
> Grepping through /usr/include on my system reveals this however:
> /usr/include/mysql/my_global.h:#define closesocket(A)	close(A)

Why would mono include mysql headers?

> Since closesocket() and close() are identical on Unix (as far as I
> know), there may be more than just that include file that redefine
> them.

closesocket() does not exist on Unix. It's a Windows API emulated
by Mono's IO layer.


More information about the Mono-devel-list mailing list