tools/nolibc/time: create time.h with time()
authorWilly Tarreau <w@1wt.eu>
Mon, 7 Feb 2022 16:23:52 +0000 (17:23 +0100)
committerPaul E. McKenney <paulmck@kernel.org>
Mon, 14 Feb 2022 18:48:55 +0000 (10:48 -0800)
commit3755f4beb2fa1be96a2655f248fe819b20d58c83
tree3b301aef2fc6c97dddcda924a716722a24b3fb98
parentb9a1e49b968bc7e044b0af9d6b11bab9634f737d
tools/nolibc/time: create time.h with time()

The time() syscall is used by a few simple applications, and is trivial
to implement based on gettimeofday() that we already have. Let's create
the file to ease porting and provide the function. It never returns any
error, though it may segfault in case of invalid pointer, like other
implementations relying on gettimeofday().

Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
tools/include/nolibc/nolibc.h
tools/include/nolibc/time.h [new file with mode: 0644]