math: make math functions generic

We are using now C++ implementation. Since they seem to rely on C++ intrinsics
and not in any OS-provided symbol, I trust AARCH64's C++ compiler will provide us
with something as well. We can then make it generic.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
Tested-by: Claudio Fontana <claudio.fontana@huawei.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
pthread: implement pthread_exit

iperf client mode call this when connection fails, so this is needed to prevent
abort() on the condition.

Signed-off-by: Takuya ASADA <syuu@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
vfs: fix errno in futimesat()

If dirfd is invalid, fstat returns -1 and sets errno.
Return this errno instead of returning -1 as errno.

Found while writing a test for futimesat.

Signed-off-by: Jaspal Singh Dhillon <jaspal.iiith@gmail.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
tests: add test for futimesat()

Add tests for futimesat().

Signed-off-by: Jaspal Singh Dhillon <jaspal.iiith@gmail.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Merge branch 'master' of https://github.com/cloudius-systems/osv