mirror of
https://github.com/espressif/esp-idf.git
synced 2026-07-13 14:33:06 +03:00
The Linux LWIP port was using --wrap linker flags to intercept read, write, close, fcntl and select, routing socket FDs (>= LWIP_SOCKET_OFFSET) to lwip_*() functions. This conflicted with the dlsym(RTLD_NEXT) cooperative syscall interposition used by the new FreeRTOS Linux simulator. Replace the --wrap approach with esp_vfs_register_fd_range(), matching how LWIP already integrates with VFS on bare-metal ESP32 targets. The cooperative read()/write() wrappers in vfs_coop_syscalls.c check VFS first, so LWIP FDs are dispatched to lwip_read() etc. before the cooperative fallback path is reached.