zephyr/lib
Yong Cong Sin cd2c7874b9 posix: uname: use BUILD_VERSION only if not empty
The `BUILD_VERSION` can be defined but empty when built
without git, causing version to be missing from the uname
version string:

```
*** Booting Zephyr OS build 3.5.0 ***

Printing everything in utsname...
sysname[7]: Zephyr
nodename[7]: zephyr
release[13]: 3.5.0
version[61]:  Apr  1 2024 23:48:30
machine[8]: riscv64

uart:~$
```

Let's check if it is empty before using it, so that
`KERNEL_VERSION_STRING`, which is generated independently
with cmake can be used as a fallback:

```
*** Booting Zephyr OS build 3.5.0 ***

Printing everything in utsname...
sysname[7]: Zephyr
nodename[7]: zephyr
release[13]: 3.5.0
version[61]: 3.5.0 Apr  1 2024 23:53:48
machine[8]: riscv64

uart:~$
```

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-04-04 23:47:33 +02:00
..
acpi lib: acpi: update shell and test app with the modifed resource struct 2024-02-15 12:28:55 +01:00
cpp
crc lib: crc: address absence of crc4, crc4_ti in crc_types array 2024-01-03 10:20:14 +01:00
hash
heap lib: heap: move heap stats to own file 2023-12-13 17:27:54 -05:00
libc posix: env: support for environ, getenv(), setenv(), unsetenv() 2024-03-08 04:28:47 -05:00
mem_blocks lib: mem_block: move to own folder 2023-12-13 17:27:54 -05:00
open-amp
os lib/os/printk.c: use ARG_UNUSED() for char_out() 2024-03-06 12:11:26 +01:00
posix posix: uname: use BUILD_VERSION only if not empty 2024-04-04 23:47:33 +02:00
runtime
smf Lib: SMF: Add initial transition and smf_set_handled() 2024-03-04 22:16:40 +01:00
utils lib: move utilities into own folder 2023-12-22 09:54:12 +01:00
CMakeLists.txt lib posix: Allow building the POSIX_API library without the host libC 2023-12-28 09:58:23 -05:00
Kconfig lib: move utilities into own folder 2023-12-22 09:54:12 +01:00