Mbed-TLS / mbedtls

An open source, portable, easy to use, readable and flexible TLS library, and reference implementation of the PSA Cryptography API. Releases are on a varying cadence, typically around 3 - 6 months between releases.
https://www.trustedfirmware.org/projects/mbed-tls/
Other
5.24k stars 2.56k forks source link

Make local functions and objects static #9218

Open casaroli opened 3 months ago

casaroli commented 3 months ago

Description

In NuttX flat build, all objects are linked together, so that they end up in a flat namespace.

If ssl_server2 and ssl_client2 are linked together, we get some multiple definitions of these functions.

It should not hurt the current use cases if set these to static.

Please accept this PR as part of a (hopefully short) series to make mbedtls more cleanly integrated in NuttX.

PR checklist

Please tick as appropriate and edit the reasons (e.g.: "backport: not needed because this is a new feature")

Notes for the submitter

Please refer to the contributing guidelines, especially the checklist for PR contributors.

Help make review efficient:

misch7 commented 3 months ago

Hey @casaroli,

just yesterday I pushed some commits to the PR #9189, walking over the same code files and making a lot of stuff static. Could you please checkout and build the code and see if this fixes your issues as well?