From fe08e01f6dcf1893f2d23c0d4164992e7ff7032c Mon Sep 17 00:00:00 2001 From: Alan Carvalho de Assis Date: Fri, 22 Mar 2024 10:59:26 -0300 Subject: [PATCH] libc/uname: Use CONFIG_NSH_DISABLE_UNAME_TIMESTAMP Don't include the build timestamp into final binary when the symbol CONFIG_NSH_DISABLE_UNAME_TIMESTAMP is defined. Signed-off-by: Alan C. Assis --- libs/libc/misc/lib_utsname.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/libc/misc/lib_utsname.c b/libs/libc/misc/lib_utsname.c index 6bfe796186255..d9967f1d4463c 100644 --- a/libs/libc/misc/lib_utsname.c +++ b/libs/libc/misc/lib_utsname.c @@ -93,7 +93,8 @@ int uname(FAR struct utsname *name) strlcpy(name->release, CONFIG_VERSION_STRING, sizeof(name->release)); -#if defined(__DATE__) && defined(__TIME__) +#if defined(__DATE__) && defined(__TIME__) && \ + !defined(CONFIG_NSH_DISABLE_UNAME_TIMESTAMP) snprintf(name->version, VERSION_NAMELEN, "%s %s %s", CONFIG_VERSION_BUILD, __DATE__, __TIME__); #else