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>
Thu, 24 Feb 2022 17:56:46 +0000 (09:56 -0800)
commit21b09698383dfb3217085de46ce35caa6378b7df
treed087c21bf1b1d5ebe4b838a7b08c6a59bcc48066
parent319c9f2279d42283b2ec3c2ee61733ba95b21140
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]