lwip: Convert fcntl argument, add missing defs

This commit is contained in:
Norman Feske 2012-08-20 12:29:49 +02:00
parent 94caac575b
commit 0296e6f66b
2 changed files with 3 additions and 3 deletions

View File

@ -27,7 +27,7 @@ SRC_C += etharp.c
LIBS = thread cxx alarm signal libc timed_semaphore LIBS = thread cxx alarm signal libc timed_semaphore
D_OPTS = ERRNO SO_REUSE D_OPTS = ERRNO SO_REUSE LWIP_SO_RCVBUF RECV_BUFSIZE_DEFAULT=8192
D_OPTS := $(addprefix -D,$(D_OPTS)) D_OPTS := $(addprefix -D,$(D_OPTS))
CC_DEF += $(D_OPTS) CC_DEF += $(D_OPTS)

View File

@ -321,10 +321,10 @@ int Plugin::fcntl(Libc::File_descriptor *sockfdo, int cmd, long val)
switch (cmd) { switch (cmd) {
case F_GETFL: case F_GETFL:
case F_SETFL: case F_SETFL:
result = lwip_fcntl(s, cmd, val); result = lwip_fcntl(s, cmd, (val & O_NONBLOCK) ? -1 : O_NONBLOCK);
break; break;
default: default:
PERR("unsupported fcntl() request"); PERR("unsupported fcntl() request: %d", cmd);
break; break;
} }