Skip to content

Commit

Permalink
libc/uname: Use CONFIG_NSH_DISABLE_UNAME_TIMESTAMP
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
acassis committed Mar 22, 2024
1 parent 63a0a54 commit fe08e01
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libs/libc/misc/lib_utsname.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fe08e01

Please sign in to comment.