From: Alejandro Colomar Date: Tue, 22 Jul 2025 20:14:08 +0000 (+0200) Subject: lib/string/: strerrno(): Add macro X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8f58cc428ceb395abdc884b2ead382d897ad2511;p=thirdparty%2Fshadow.git lib/string/: strerrno(): Add macro Signed-off-by: Alejandro Colomar --- diff --git a/lib/Makefile.am b/lib/Makefile.am index b6420e3dc..60c4948d8 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -247,6 +247,8 @@ libshadow_la_SOURCES = \ string/strdup/strndupa.h \ string/strdup/strndup.c \ string/strdup/strndup.h \ + string/strerrno.c \ + string/strerrno.h \ string/strftime.c \ string/strftime.h \ string/strspn/stpspn.c \ diff --git a/lib/string/strerrno.c b/lib/string/strerrno.c new file mode 100644 index 000000000..d7e817c03 --- /dev/null +++ b/lib/string/strerrno.c @@ -0,0 +1,7 @@ +// SPDX-FileCopyrightText: 2025, Alejandro Colomar +// SPDX-License-Identifier: BSD-3-Clause + + +#include "config.h" + +#include "string/strerrno.h" diff --git a/lib/string/strerrno.h b/lib/string/strerrno.h new file mode 100644 index 000000000..b82e1015c --- /dev/null +++ b/lib/string/strerrno.h @@ -0,0 +1,19 @@ +// SPDX-FileCopyrightText: 2025, Alejandro Colomar +// SPDX-License-Identifier: BSD-3-Clause + + +#ifndef SHADOW_INCLUDE_LIB_STRING_STRERRNO_H_ +#define SHADOW_INCLUDE_LIB_STRING_STRERRNO_H_ + + +#include "config.h" + +#include +#include + + +// strerrno - string errno +#define strerrno() ((const char *){strerror(errno)}) + + +#endif // include guard