diff --git a/src/slirp/ip_input.c b/src/slirp/ip_input.c index fb8f3fcf1..62fd5d202 100644 --- a/src/slirp/ip_input.c +++ b/src/slirp/ip_input.c @@ -37,7 +37,6 @@ * Please read the file COPYRIGHT for the * terms and conditions of the copyright. */ - #include "slirp.h" #include "ip_icmp.h" diff --git a/src/slirp/slirp.c b/src/slirp/slirp.c index 8725b8922..eb803d236 100644 --- a/src/slirp/slirp.c +++ b/src/slirp/slirp.c @@ -12,6 +12,7 @@ struct in_addr special_addr; /* virtual address alias for host */ struct in_addr alias_addr; +/* FIXME: this is probably not working with new MAC address stuff.. --FvK */ const uint8_t special_ethaddr[6] = { 0x52, 0x54, 0x00, 0x12, 0x35, 0x00 }; @@ -29,6 +30,11 @@ fd_set *global_readfds, *global_writefds, *global_xfds; char slirp_hostname[33]; + +extern void pclog(const char *, ...); +extern int config_get_int(char *, char *, int); + + #ifdef _WIN32 static int get_dns_addr(struct in_addr *pdns_addr) @@ -464,7 +470,7 @@ void slirp_select_poll(fd_set *readfds, fd_set *writefds, fd_set *xfds) //winsock2.h:549:32: note: expected 'const char *' but argument is of type 'int *' //WINSOCK_API_LINKAGE int PASCAL send(SOCKET,const char*,int,int); JASON //ret = send(so->s, "a", 1, 0); WHY THE HELL WAS THIS HERE?! - ret = send(so->s, &ret, 0, 0); //This is what it should be. + ret = send(so->s, (char *)&ret, 0, 0); //This is what it should be. if (ret < 0) { /* XXXXX Must fix, zero bytes is a NOP */ if (errno == EAGAIN || errno == EWOULDBLOCK || @@ -510,7 +516,7 @@ void slirp_select_poll(fd_set *readfds, fd_set *writefds, fd_set *xfds) /* tcp_input will take care of it */ } else { - ret = send(so->s, &ret, 0,0); + ret = send(so->s, (char *)&ret, 0,0); if (ret < 0) { /* XXX */ if (errno == EAGAIN || errno == EWOULDBLOCK || diff --git a/src/slirp/slirp.h b/src/slirp/slirp.h index b7b077527..3f4efd0bd 100644 --- a/src/slirp/slirp.h +++ b/src/slirp/slirp.h @@ -328,8 +328,13 @@ extern int do_echo; # define insque_32 insque # define remque_32 remque #else - extern __inline void insque_32 _P((void *, void *)); - extern __inline void remque_32 _P((void *)); +# ifdef NEED_QUE32_INLINE +extern __inline void insque_32 _P((void *, void *)); +extern __inline void remque_32 _P((void *)); +# else +extern void insque_32 _P((void *, void *)); +extern void remque_32 _P((void *)); +# endif #endif #ifndef _WIN32 diff --git a/src/slirp/tcp_input.c b/src/slirp/tcp_input.c index 77006a2d7..97187788d 100644 --- a/src/slirp/tcp_input.c +++ b/src/slirp/tcp_input.c @@ -37,7 +37,6 @@ * Please read the file COPYRIGHT for the * terms and conditions of the copyright. */ - #include #include "slirp.h" #include "ip_icmp.h" diff --git a/src/slirp/udp.c b/src/slirp/udp.c index 318ac6400..fbeb3c340 100644 --- a/src/slirp/udp.c +++ b/src/slirp/udp.c @@ -150,6 +150,7 @@ udp_input(m, iphlen) goto bad; } +#ifdef NEED_TFTP /* * handle TFTP */ @@ -157,6 +158,7 @@ udp_input(m, iphlen) tftp_input(m); goto bad; } +#endif /* * Locate pcb for datagram.