From ae89f88cfbcb7422b5e85491d33d4d7e2fabb86e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Tue, 14 Aug 2012 11:55:41 +0200 Subject: [PATCH] Noux/net: adjust noux/net to lwip-1.4.1-rc1 Fixes #328. --- ports/src/noux/net/net.cc | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/ports/src/noux/net/net.cc b/ports/src/noux/net/net.cc index bdf5402c81..ee930dc90d 100644 --- a/ports/src/noux/net/net.cc +++ b/ports/src/noux/net/net.cc @@ -24,13 +24,13 @@ #include #include -using namespace Noux; - /* Libc includes */ #include #include #include +using namespace Noux; + void (*libc_select_notify)(); void (*close_socket)(int); @@ -105,7 +105,15 @@ static void _close_socket(int sd) void init_network() { - lwip_tcpip_init(); + PINF("--- noux: initialize network ---"); + + /** + * NOTE: we only call lwip_nic_init() because + * lwip_tcpip_init() was already called by libc_lwip's + * constructor and we don't want to have another tcpip + * thread. + */ + lwip_nic_init(0, 0, 0); if (!libc_select_notify) @@ -154,6 +162,7 @@ bool Noux::Child::_syscall_net(Noux::Session::Syscall sc) case SYSCALL_UNLINK: case SYSCALL_RENAME: case SYSCALL_MKDIR: + case SYSCALL_FTRUNCATE: break; case SYSCALL_SOCKET: {