Fixed SLIRP warnings, disabled its TFTP module.
This commit is contained in:
@@ -37,7 +37,6 @@
|
||||
* Please read the file COPYRIGHT for the
|
||||
* terms and conditions of the copyright.
|
||||
*/
|
||||
|
||||
#include "slirp.h"
|
||||
#include "ip_icmp.h"
|
||||
|
||||
|
||||
@@ -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 ||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -37,7 +37,6 @@
|
||||
* Please read the file COPYRIGHT for the
|
||||
* terms and conditions of the copyright.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "slirp.h"
|
||||
#include "ip_icmp.h"
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user