Bruno, the patch causes build failures on mingw:

./unistd.h:313: error: conflicting types for 'gethostname'
/usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj/../../../../i586-mingw32msvc/include/winsock2.h:635:
 error: previous declaration of 'gethostname' was here

The problem is that the native gethostname Win API uses 'int' instead of
'size_t' as the prototype.

Should we replace the system gethostname with a wrapper?  Or can we use
a simple #define such as

#define gethostname(name, len) gethostname (name, (int) len)

when using the winsock2.h gethostname definition?

/Simon


Reply via email to