On Fri, 20 Oct, 2023 12:47:39 -0700 Richard Cochran <richardcoch...@gmail.com> wrote: > On Thu, Oct 19, 2023 at 03:50:20PM +0100, Luca Fancellu wrote: >> From: Khem Raj <raj.k...@gmail.com> >> >> Signed-off-by: Khem Raj <raj.k...@gmail.com> >> --- >> interface.c | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/interface.c b/interface.c >> index 29229ad6f53d..9a83c36933e7 100644 >> --- a/interface.c >> +++ b/interface.c >> @@ -5,6 +5,7 @@ >> * @note SPDX-License-Identifier: GPL-2.0+ >> */ >> #include <stdlib.h> >> +#include <string.h> >> #include "interface.h" > > What problem does this fix?
Isn't this resolving the issue that string.h is the c library standard include for strncpy? In section 7.26.2.5 of the C standard draft N3047, it is shown the you must include string.h as the proper header including the declaration for strncpy. With some toolchains, not explicitly including the header may work, but it's not a guarantee by the standard from my understanding. * https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3047.pdf * https://godbolt.org/z/7YG7KGab8 -- Thanks, Rahul Rameshbabu _______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel