mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2026-01-21 16:49:12 +00:00
fix(zephyr): Real os_timespec definition with comments
This commit is contained in:
parent
45acd9fb9f
commit
c8a7f00326
|
|
@ -281,7 +281,24 @@ typedef unsigned int os_nfds_t;
|
|||
|
||||
#define FIONREAD ZFD_IOCTL_FIONREAD
|
||||
|
||||
typedef struct timespec os_timespec;
|
||||
/*
|
||||
* The previous `os_timespec` was a forward declaration:
|
||||
*
|
||||
* typedef struct timespec os_timespec;
|
||||
*
|
||||
* It was not bad as is, but seemed to not be included from anywhere.
|
||||
* As of Zephyr v3.7.0 (LTS) the `timespec` struct is only declared with the
|
||||
* configuration `CONFIG_POSIX_API` enabled which is not a prefered
|
||||
* configuration for the Zephyr port.
|
||||
*
|
||||
* NOTE: If Zephyr later exposes `struct timespec` without requiring
|
||||
* CONFIG_POSIX_API, this definition should be replaced by an alias.
|
||||
*/
|
||||
typedef struct {
|
||||
int64_t tv_sec;
|
||||
long tv_nsec;
|
||||
} os_timespec;
|
||||
|
||||
|
||||
#ifndef CLOCK_REALTIME
|
||||
#define CLOCK_REALTIME 1
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user