File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed
core/shared/platform/zephyr Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -301,7 +301,24 @@ typedef unsigned int os_nfds_t;
301301
302302#define FIONREAD ZFD_IOCTL_FIONREAD
303303
304- typedef struct timespec os_timespec ;
304+ /*
305+ * The previous `os_timespec` was a forward declaration:
306+ *
307+ * typedef struct timespec os_timespec;
308+ *
309+ * It was not bad as is, but seemed to not be included from anywhere.
310+ * As of Zephyr v3.7.0 (LTS) the `timespec` struct is only declared with the
311+ * configuration `CONFIG_POSIX_API` enabled which is not a prefered
312+ * configuration for the Zephyr port.
313+ *
314+ * NOTE: If Zephyr later exposes `struct timespec` without requiring
315+ * CONFIG_POSIX_API, this definition should be replaced by an alias.
316+ */
317+ typedef struct {
318+ int64_t tv_sec ;
319+ long tv_nsec ;
320+ } os_timespec ;
321+
305322
306323#ifndef CLOCK_REALTIME
307324#define CLOCK_REALTIME 1
You can’t perform that action at this time.
0 commit comments