zephyr/lib/posix/options
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
..
getopt
CMakeLists.txt posix: net: add kconfig option and inet_addr() 2024-03-27 07:36:18 -04:00
Kconfig posix: net: add kconfig option and inet_addr() 2024-03-27 07:36:18 -04:00
Kconfig.barrier
Kconfig.clock
Kconfig.cond
Kconfig.confstr posix: unistd: support for confstr() 2024-03-22 08:57:44 +01:00
Kconfig.env
Kconfig.eventfd
Kconfig.fdtable
Kconfig.fnmatch
Kconfig.fs
Kconfig.getopt
Kconfig.key
Kconfig.mqueue
Kconfig.mutex
Kconfig.net posix: net: add kconfig option and inet_addr() 2024-03-27 07:36:18 -04:00
Kconfig.pthread
Kconfig.rwlock
Kconfig.sched
Kconfig.semaphore
Kconfig.signal
Kconfig.spinlock
Kconfig.stropts
Kconfig.sysconf posix: sysconf: add a "small" implementation option 2024-03-12 17:57:11 +00:00
Kconfig.syslog
Kconfig.template.pooled_ipc_type
Kconfig.template.pooled_type
Kconfig.template.with_logging
Kconfig.template.with_url
Kconfig.timer
Kconfig.uname
_common.c
barrier.c
clock.c posix: clock: implement clock_getres() 2024-03-22 16:19:27 -04:00
cond.c
confstr.c posix: unistd: support for confstr() 2024-03-22 08:57:44 +01:00
env.c
eventfd.c
fnmatch.c
fs.c
key.c
mqueue.c
mutex.c
nanosleep.c
net.c posix: convert static inline functions to library functions 2024-04-02 21:01:33 -04:00
perror.c
posix_clock.h
posix_internal.h posix: Implement set and get inheritsched APIs for pthread attr 2024-04-01 11:04:35 +01:00
pthread.c posix: implement pthread_setschedprio 2024-04-04 10:25:53 -04:00
pthread_sched.h
rwlock.c posix: rwlock: implement pthread_rwlockattr_setpshared 2024-03-22 16:19:57 -04:00
sched.c
semaphore.c
signal.c
sleep.c
spinlock.c
stropts.c posix: Implement getmsg and getpmsg 2024-03-11 14:25:26 +01:00
sysconf.c posix: sysconf: add a "small" implementation option 2024-03-12 17:57:11 +00:00
syslog.c posix: syslog: Fix uninitialized variable error 2024-03-10 07:44:03 -04:00
timer.c
uname.c posix: uname: use BUILD_VERSION only if not empty 2024-04-04 23:47:33 +02:00