diff --git a/lib/Makefile.am b/lib/Makefile.am index aaee7167..21900733 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -152,6 +152,8 @@ libshadow_la_SOURCES = \ string/sprintf/xasprintf.h \ string/strcpy/stpecpy.c \ string/strcpy/stpecpy.h \ + string/strcpy/strncat.c \ + string/strcpy/strncat.h \ string/strcpy/strncpy.c \ string/strcpy/strncpy.h \ string/strcpy/strtcpy.c \ diff --git a/lib/string/strcpy/strncat.c b/lib/string/strcpy/strncat.c new file mode 100644 index 00000000..d55f1729 --- /dev/null +++ b/lib/string/strcpy/strncat.c @@ -0,0 +1,7 @@ +// SPDX-FileCopyrightText: 2024, Alejandro Colomar +// SPDX-License-Identifier: BSD-3-Clause + + +#include + +#include "string/strcpy/strncat.h" diff --git a/lib/string/strcpy/strncat.h b/lib/string/strcpy/strncat.h new file mode 100644 index 00000000..6bb9907b --- /dev/null +++ b/lib/string/strcpy/strncat.h @@ -0,0 +1,19 @@ +// SPDX-FileCopyrightText: 2024, Alejandro Colomar +// SPDX-License-Identifier: BSD-3-Clause + + +#ifndef SHADOW_INCLUDE_LIB_STRING_STRCPY_STRNCAT_H_ +#define SHADOW_INCLUDE_LIB_STRING_STRCPY_STRNCAT_H_ + + +#include + +#include + +#include "sizeof.h" + + +#define STRNCAT(dst, src) strncat(dst, src, NITEMS(src)) + + +#endif // include guard