eal: add timespec_get shim
authorDmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Wed, 21 Apr 2021 19:33:49 +0000 (22:33 +0300)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 21 Apr 2021 21:32:13 +0000 (23:32 +0200)
commit1ee899977d701768f6437e2b178a06e46283f821
treed38d135bd4a9e471cbe69d4b80b1da69f6715ea9
parent4a8ab48ec47b3616272e50620b8e1a9599358ea6
eal: add timespec_get shim

C11 timespec_get() is not provided on some platforms:

* MinGW-w64 does not currently implement it [1].
* FreeBSD 11 with Clang 10.0.0 does not provide it.

Add internal shims to Windows and FreeBSD EALs.
For Windows, it can be removed after [1] is fixed.

[1]: https://sourceforge.net/p/mingw-w64/mailman/message/37224689/

Signed-off-by: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Acked-by: Jie Zhou <jizh@linux.microsoft.com>
Acked-by: Nick Connolly <nick.connolly@mayadata.io>
lib/eal/freebsd/include/rte_os_shim.h
lib/eal/windows/include/rte_os_shim.h