Mreged back changes that were lost during the savannah hack 3 weeks ago (using the sources from http://git.infradead.org/users/dwmw2/lwip.git)

This commit is contained in:
goldsimon
2010-12-20 18:03:51 +00:00
parent 1bd06bee82
commit effcb90fdf
8 changed files with 71 additions and 35 deletions

View File

@@ -2252,15 +2252,18 @@ int
lwip_ioctl(int s, long cmd, void *argp)
{
struct lwip_sock *sock = get_socket(s);
u8_t val;
#if LWIP_SO_RCVBUF
u16_t buflen = 0;
s16_t recv_avail;
u8_t val;
#endif /* LWIP_SO_RCVBUF */
if (!sock) {
return -1;
}
switch (cmd) {
#if LWIP_SO_RCVBUF
case FIONREAD:
if (!argp) {
sock_set_errno(sock, EINVAL);
@@ -2288,6 +2291,7 @@ lwip_ioctl(int s, long cmd, void *argp)
LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_ioctl(%d, FIONREAD, %p) = %"U16_F"\n", s, argp, *((u16_t*)argp)));
sock_set_errno(sock, 0);
return 0;
#endif /* LWIP_SO_RCVBUF */
case FIONBIO:
val = 0;