lwIP | netstart.h: Add the extern "C" guard (!55)

Sam Price (@TheSamPrice) gitlab at rtems.org
Fri Sep 11 17:55:12 UTC 2026



Sam Price created a merge request: https://gitlab.rtems.org/rtems/pkg/rtems-lwip/-/merge_requests/55

Project:Branches: TheSamPrice/rtems-lwip:netstart-extern-c to rtems/pkg/rtems-lwip:main
Author: Sam Price

## Summary

netstart.h: Add the extern "C" guard

The header declares start_networking() and start_networking_shared() with no
guard, so a C++ caller gets C++-mangled references that nothing defines:

    undefined reference to `start_networking(netif*, ip_addr*, ip_addr*,
                                             ip_addr*, unsigned char*)'

It compiles, and fails at link with a message that names a function the caller
can plainly see is there -- which sends the reader looking for a missing
library rather than a missing guard.

netstart.h is the public entry point to this library: bringing the interface up
is the first thing any application does with it, and an application in C++ is
not unusual.

Several other headers under rtemslwip/include are also unguarded --
sys/sysctl.h, xil-compat-lwip-common.h, arch/sys_arch.h among them.  They are
left alone here because they are internal to the build and because one header
is a reviewable change; the same argument applies to them if anyone reaches
them from C++.

Signed-off-by: Samuel Price <thesamprice at gmail.com>
Assisted-by: Claude Opus 5 (1M context) <noreply at anthropic.com>


## Generative AI

Assisted-by: Claude Opus 5 (1M context) <noreply at anthropic.com>



<!-- Default settings, if it is a dropdown it will set after submission -->

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/pkg/rtems-lwip/-/merge_requests/55
You're receiving this email because of your account on gitlab.rtems.org. Unsubscribe from this thread: https://gitlab.rtems.org/-/namespace/22/sent_notifications/5-9msoicw0mnnr1gfr60e9be93v-m/unsubscribe | Manage all notifications: https://gitlab.rtems.org/-/profile/notifications | Help: https://gitlab.rtems.org/help


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20260911/d5d99b89/attachment.htm>


More information about the bugs mailing list