frekky / iodine

iodine fork to improve performance and add features
45 stars 12 forks source link

Windows build error #3

Closed ghost closed 8 years ago

ghost commented 8 years ago

I'm compiling with mingw on windows.

D:\mingw\msys\1.0\home\denny\iodine-master>make
make[1]: Entering directory `/usr/home/denny/iodine-master/src'
OS is WINDOWS32, arch is i686
CC common.c
fatal: Not a git repository (or any of the parent directories): .git
In file included from common.c:54:0:
common.h:60:0: warning: "BITS_32" redefined
 #define BITS_32 1
 ^
common.h:52:0: note: this is the location of the previous definition
 #define BITS_32
 ^
common.c: In function 'format_addr':
common.c:124:3: warning: implicit declaration of function 'getnameinfo' [-Wimplicit-function-declaration]
   getnameinfo((struct sockaddr *)sockaddr, sockaddr_len, dst, sizeof(dst) - 1, NULL, 0, NI_NUMERICHOST);
   ^
common.c: In function 'get_addr':
common.c:162:2: warning: implicit declaration of function 'getaddrinfo' [-Wimplicit-function-declaration]
  res = getaddrinfo(host, portnum, &hints, &addr);
  ^
common.c:167:3: warning: implicit declaration of function 'freeaddrinfo' [-Wimplicit-function-declaration]
   freeaddrinfo(addr);
   ^
common.c: In function 'open_dns_opt':
common.c:200:32: error: 'IPV6_V6ONLY' undeclared (first use in this function)
   setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, (const void*) &v6only, sizeof(v6only));
                                ^
common.c:200:32: note: each undeclared identifier is reported only once for each function it appears in
common.c: In function 'socket_set_blocking':
common.c:411:31: warning: passing argument 3 of 'ioctlsocket' from incompatible pointer type
  if (ioctlsocket(fd, FIONBIO, &blocking) != 0) {
                               ^
In file included from common.c:33:0:
d:\mingw\include\winsock2.h:540:32: note: expected 'u_long *' but argument is of type 'int *'
 WINSOCK_API_LINKAGE int PASCAL ioctlsocket(SOCKET,long,u_long *);
                                ^
common.c: In function 'open_tcp_nonblocking':
common.c:445:21: error: 'EINPROGRESS' undeclared (first use in this function)
   == -1 && errno != EINPROGRESS) {
                     ^
common.c: In function 'check_tcp_error':
common.c:465:43: warning: passing argument 4 of 'getsockopt' from incompatible pointer type
  if (getsockopt(fd, SOL_SOCKET, SO_ERROR, &errornum, &len) != 0) {
                                           ^
In file included from common.c:33:0:
d:\mingw\include\winsock2.h:543:32: note: expected 'char *' but argument is of type 'int *'
 WINSOCK_API_LINKAGE int PASCAL getsockopt(SOCKET,int,int,char*,int*);
                                ^
make[1]: *** [common.o] Error 1
make[1]: Leaving directory `/usr/home/denny/iodine-master/src'
make: *** [all] Error 2
ghost commented 8 years ago

Sry, its a problem with my mingw installation. Problem solved.