generated from amazon-archives/__template_MIT-0
-
Notifications
You must be signed in to change notification settings - Fork 209
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Building FreeRTOS-Plus-TCP with libslirp >= 4.9.0 triggers a deprecation warning for slirp_pollfds_fill in MBuffNetifBackendLibslirp.c.
Expected behavior
No deprecation warnings with modern libslirp versions.
Actual behavior
/FreeRTOS/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/source/portable/NetworkInterface/libslirp/MBuffNetifBackendLibslirp.c: In function 'vReceiveThread':
/FreeRTOS/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/source/portable/NetworkInterface/libslirp/MBuffNetifBackendLibslirp.c:709:13: warning: 'slirp_pollfds_fill' is deprecated [-Wdeprecated-declarations]
709 | slirp_pollfds_fill( pxCtx->pxSlirp, &ulPollerTimeoutMs, lSlirpAddPollCallback, pxCtx );
| ^~~~~~~~~~~~~~~~~~
In file included from /FreeRTOS/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/source/portable/NetworkInterface/libslirp/MBuffNetifBackendLibslirp.c:33:
/usr/include/slirp/libslirp.h:273:6: note: declared here
273 | void slirp_pollfds_fill(Slirp *slirp, uint32_t *timeout,
| ^~~~~~~~~~~~~~~~~~
Additional context
- libslirp version: >= 4.9.0 (can be checked with
pkg-config --modversion libslirp). - The function
slirp_pollfds_fillwas deprecated in libslirp 4.9.0. The new API usesslirp_pollfds_fill_socketand requires changes in callback signatures (e.g., usingslirp_os_socketinstead ofintfor file descriptors). - Examples of migration can be found in other projects like QEMU or FreeBSD bhyve.
- The warning does not break the build but indicates technical debt that should be addressed for future compatibility with upcoming libslirp releases.
Possible solution
- Add conditional compilation based on
SLIRP_CHECK_VERSIONto use the new API when available. - Update the callback registration to match the new signatures.
I'm a complete beginner and don't understand anything in this project. I've never worked with any networking stack before. But I'd still like to try fixing this warning if possible — I'm willing to learn and put in the effort. However, I realize that my attempt might create more work for maintainers than it's worth. Let me know if it makes sense for me to try, and if so, could someone point me in the right direction (which files to look at, what needs to be done, examples, etc.)?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working