diff --git a/repos/libports/include/lwip/arch/cc.h b/repos/libports/include/lwip/arch/cc.h index c43cdca2f..8b561c7d5 100644 --- a/repos/libports/include/lwip/arch/cc.h +++ b/repos/libports/include/lwip/arch/cc.h @@ -61,6 +61,7 @@ typedef uintptr_t mem_ptr_t; #ifndef LWIP_NO_INTTYPES_H #define LWIP_NO_INTTYPES_H 1 /* Define (sn)printf formatters */ +#define X8_F "02x" #define U16_F "u" // we don't have hu #define S16_F "d" // we don't have hd #define X16_F "x" // we don't have hx diff --git a/repos/libports/src/lib/vfs/lwip/vfs.cc b/repos/libports/src/lib/vfs/lwip/vfs.cc index 4b0dda92e..e4ebcd973 100644 --- a/repos/libports/src/lib/vfs/lwip/vfs.cc +++ b/repos/libports/src/lib/vfs/lwip/vfs.cc @@ -1092,17 +1092,13 @@ class Lwip::Tcp_socket_dir final : * * Triggered by error callback, usually * just by an aborted connection. + * The corresponding pcb is already freed + * when this callback is called! */ void error() { state = CLOSED; - - /* the PCB is expired now */ - if (_pcb) { - tcp_arg(_pcb, NULL); - tcp_close(_pcb); - _pcb = NULL; - } + _pcb = NULL; /* churn the application */ handle_io(~0U);