Skip to content

Instantly share code, notes, and snippets.

@sidprice
Created October 21, 2018 21:56
Show Gist options
  • Save sidprice/75ee9086a499018421313d525b818611 to your computer and use it in GitHub Desktop.
Save sidprice/75ee9086a499018421313d525b818611 to your computer and use it in GitHub Desktop.
In file included from /usr/include/w32api/winsock2.h:56:0,
from platforms/libftdi/gdb_if.c:33:
/usr/include/w32api/psdk_inc/_fd_types.h:100:2: error: #warning "fd_set and associated macros have been defined in sys/types. This can cause runtime problems with W32 sockets" [-Werror=cpp]
#warning "fd_set and associated macros have been defined in sys/types. \
^~~~~~~
In file included from platforms/libftdi/gdb_if.c:33:0:
/usr/include/w32api/winsock2.h:995:34: error: conflicting types for ‘select’
WINSOCK_API_LINKAGE int WSAAPI select(int nfds,fd_set *readfds,fd_set *writefds,fd_set *exceptfds,const PTIMEVAL timeout);
^~~~~~
In file included from /usr/include/sys/types.h:68:0,
from /usr/include/stdio.h:61,
from platforms/libftdi/gdb_if.c:25:
/usr/include/sys/select.h:62:5: note: previous declaration of ‘select’ was here
int select __P ((int __n, fd_set *__readfds, fd_set *__writefds,
^~~~~~
platforms/libftdi/gdb_if.c: In function ‘gdb_if_getchar_to’:
platforms/libftdi/gdb_if.c:106:45: error: passing argument 5 of ‘select’ from incompatible pointer type [-Werror=incompatible-pointer-types]
if(select(gdb_if_conn+1, &fds, NULL, NULL, &tv) > 0)
^
In file included from platforms/libftdi/gdb_if.c:33:0:
/usr/include/w32api/winsock2.h:995:34: note: expected ‘PTIMEVAL {aka struct __ms_timeval * const}’ but argument is of type ‘struct timeval *’
WINSOCK_API_LINKAGE int WSAAPI select(int nfds,fd_set *readfds,fd_set *writefds,fd_set *exceptfds,const PTIMEVAL timeout);
^~~~~~
platforms/libftdi/gdb_if.c: In function ‘gdb_if_putchar’:
platforms/libftdi/gdb_if.c:123:22: error: pointer targets in passing argument 2 of ‘send’ differ in signedness [-Werror=pointer-sign]
send(gdb_if_conn, buf, bufsize, 0);
^~~
In file included from platforms/libftdi/gdb_if.c:33:0:
/usr/include/w32api/winsock2.h:997:34: note: expected ‘const char *’ but argument is of type ‘uint8_t * {aka unsigned char *}’
WINSOCK_API_LINKAGE int WSAAPI send(SOCKET s,const char *buf,int len,int flags);
^~~~
platforms/libftdi/gdb_if.c: At top level:
cc1: error: unrecognized command line option ‘-Wno-cast-function-type’ [-Werror]
cc1: all warnings being treated as errors
make: *** [Makefile:74: gdb_if.o] Error 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment