bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

error compiling gethostname.c on woe32


From: Sam Steingold
Subject: error compiling gethostname.c on woe32
Date: Wed, 30 Sep 2009 18:42:55 -0400
User-agent: Thunderbird 2.0.0.22 (X11/20090625)

here is the error message I get when I try to compile gethostname.c:

gcc -mno-cygwin -DHAVE_CONFIG_H -I. -I/cygdrive/c/sds/dev/current/modules/syscalls/gllib -I.. -I/cygdrive/c/sds/top/include -Ic:/sds/dev/current/build-mingw-4/gllib -g -O2 -W -Wswitch -Wcomment -Wpointer-arith -Wimplicit -Wreturn-type -Wmissing-declarations -Wno-sign-compare -Wno-format-nonliteral -falign-functions=4 -D_WIN32 -g -O0 -DDEBUG_OS_ERROR -DDEBUG_SPVW -DDEBUG_BYTECODE -DSAFETY=3 -DUNICODE -DNO_TERMCAP_NCURSES -DDYNAMIC_FFI -DDYNAMIC_MODULES -DNO_GETTEXT -I. -IC:\sds\dev\current\build-mingw-4\linkkit/.. -MT gethostname.o -MD -MP -MF .deps/gethostname.Tpo -c -o gethostname.o /cygdrive/c/sds/dev/current/modules/syscalls/gllib/gethostname.c In file included from /cygdrive/c/sds/dev/current/modules/syscalls/gllib/gethostname.c:83: /cygdrive/c/sds/dev/current/modules/syscalls/gllib/w32sock.h: In function `set_winsock_errno': /cygdrive/c/sds/dev/current/modules/syscalls/gllib/w32sock.h:34: warning: implicit declaration of function `WSAGetLastError' /cygdrive/c/sds/dev/current/modules/syscalls/gllib/w32sock.h:35: warning: implicit declaration of function `WSASetLastError' /cygdrive/c/sds/dev/current/modules/syscalls/gllib/w32sock.h:40: error: `WSA_INVALID_HANDLE' undeclared (first use in this function) /cygdrive/c/sds/dev/current/modules/syscalls/gllib/w32sock.h:40: error: (Each undeclared identifier is reported only once /cygdrive/c/sds/dev/current/modules/syscalls/gllib/w32sock.h:40: error: for each function it appears in.) /cygdrive/c/sds/dev/current/modules/syscalls/gllib/w32sock.h:43: error: `WSA_NOT_ENOUGH_MEMORY' undeclared (first use in this function) /cygdrive/c/sds/dev/current/modules/syscalls/gllib/w32sock.h:46: error: `WSA_INVALID_PARAMETER' undeclared (first use in this function) /cygdrive/c/sds/dev/current/modules/syscalls/gllib/w32sock.h:49: error: `WSAEWOULDBLOCK' undeclared (first use in this function) /cygdrive/c/sds/dev/current/modules/syscalls/gllib/w32sock.h:52: error: `WSAENAMETOOLONG' undeclared (first use in this function) /cygdrive/c/sds/dev/current/modules/syscalls/gllib/w32sock.h:55: error: `WSAENOTEMPTY' undeclared (first use in this function)
In file included from ./sys/socket.h:111,
from /cygdrive/c/sds/dev/current/modules/syscalls/gllib/sockets.h:37, from /cygdrive/c/sds/dev/current/modules/syscalls/gllib/gethostname.c:85: /usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../include/w32api/winsock2.h: At top level: /usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../include/w32api/winsock2.h:593: error: conflicting types for 'WSASetLastError' /cygdrive/c/sds/dev/current/modules/syscalls/gllib/w32sock.h:35: error: previous implicit declaration of 'WSASetLastError' was here /usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../include/w32api/winsock2.h:594: error: conflicting types for 'WSAGetLastError' /cygdrive/c/sds/dev/current/modules/syscalls/gllib/w32sock.h:34: error: previous implicit declaration of 'WSAGetLastError' was here /cygdrive/c/sds/dev/current/modules/syscalls/gllib/gethostname.c:91: warning: no previous declaration for 'rpl_gethostname'
make[4]: *** [gethostname.o] Error 1

I think this patch is in order:
=============================================================
--- w32sock.h.~1.1.~    2009-08-06 23:34:18.000000000 -0400
+++ w32sock.h   2009-09-30 18:40:57.000212000 -0400
@@ -17,6 +17,8 @@

 /* Written by Paolo Bonzini */

+#include <winsock2.h>
+
 #include <errno.h>

 /* Get O_RDWR and O_BINARY.  */
=============================================================

2009-09-30  Sam Steingold  <address@hidden>

        * lib/w32sock.h: include <winsock2.h> which declares
        the woe32-specific macros






reply via email to

[Prev in Thread] Current Thread [Next in Thread]