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 posix: convert all error logs to debug logs 2024-02-24 10:34:05 -05:00
_common.c
barrier.c
clock.c posix: clock: implement clock_getres() 2024-03-22 16:19:27 -04:00
CMakeLists.txt posix: net: add kconfig option and inet_addr() 2024-03-27 07:36:18 -04:00
cond.c posix: convert all error logs to debug logs 2024-02-24 10:34:05 -05:00
confstr.c posix: unistd: support for confstr() 2024-03-22 08:57:44 +01:00
env.c posix: env: support for environ, getenv(), setenv(), unsetenv() 2024-03-08 04:28:47 -05:00
eventfd.c
fnmatch.c
fs.c
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 posix: env: support for environ, getenv(), setenv(), unsetenv() 2024-03-08 04:28:47 -05:00
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 posix: syslog: add support for syslog 2024-02-29 02:45:01 -05:00
Kconfig.template.pooled_ipc_type
Kconfig.template.pooled_type
Kconfig.template.with_logging
Kconfig.template.with_url
Kconfig.timer
Kconfig.uname
key.c posix: convert all error logs to debug logs 2024-02-24 10:34:05 -05:00
mqueue.c posix: mqmeue: do not return NULL after pthread_exit() 2024-02-26 08:12:29 -05:00
mutex.c posix: mutexattr: improvements for pthread_mutexattr_t 2024-02-27 06:11:03 -05:00
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_sched.h
pthread.c posix: implement pthread_setschedprio 2024-04-04 10:25:53 -04:00
rwlock.c posix: rwlock: implement pthread_rwlockattr_setpshared 2024-03-22 16:19:57 -04:00
sched.c posix: sched: Implement sched_rr_get_interval 2024-02-02 12:42:50 +01:00
semaphore.c posix: semaphore: check return value of k_mutex_lock() 2024-02-06 17:51:56 -06:00
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