frr icon indicating copy to clipboard operation
frr copied to clipboard

lib: allow cpp program to call strlcpy, strlcat and explicit_bzero

Open nanfengnan1 opened this issue 3 weeks ago • 4 comments

nanfengnan1 avatar Dec 05 '25 10:12 nanfengnan1

I do see that you have an open issue related to this change. Can you please link it in the commit message, and also add a proper description?

also, change the prefix "lib:" to "build:" in the commit message since that is a change to the build system, it is not a change to the lib code.

issue link: https://github.com/FRRouting/frr/issues/20199 okay, I will recommit this pr.

nanfengnan1 avatar Dec 08 '25 01:12 nanfengnan1

This looks good to me now. Anything else we need here Jafar?

donaldsharp avatar Dec 09 '25 15:12 donaldsharp

why is this a configure-time decision - why not detect the presence of these functions in our header files (and conditionally supply our own prototypes if necessary)?

mjstapp avatar Dec 09 '25 15:12 mjstapp

This pull request has conflicts, please resolve those before we can evaluate the pull request.

github-actions[bot] avatar Dec 09 '25 21:12 github-actions[bot]

Do we need this commit anymore @eqvinox @nanfengnan1

donaldsharp avatar Dec 16 '25 17:12 donaldsharp

I think we should close it if exist better pr

nanfengnan1 avatar Dec 17 '25 01:12 nanfengnan1

commit c8dfd25be9343c6100ff4cc9a079d8270cecaec2 (origin/pr/20234) Author: David Lamparter [email protected] Date: Tue Dec 9 18:32:14 2025 +0100

build: make `strlcpy` and co. decls C++ compatible

Need an `extern "C"` on these so C++ links to the correct symbols.

Fixes: FRRouting/frr#20199
Signed-off-by: David Lamparter <[email protected]>

@nanfengnan1 can you test latest master and see if it works for you now?

donaldsharp avatar Dec 17 '25 16:12 donaldsharp