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 @@ -281,7 +281,24 @@ typedef unsigned int os_nfds_t;
281281
282282#define FIONREAD ZFD_IOCTL_FIONREAD
283283
284- typedef struct timespec os_timespec ;
284+ /*
285+ * The previous `os_timespec` was a forward declaration:
286+ *
287+ * typedef struct timespec os_timespec;
288+ *
289+ * It was not bad as is, but seemed to not be included from anywhere.
290+ * As of Zephyr v3.7.0 (LTS) the `timespec` struct is only declared with the
291+ * configuration `CONFIG_POSIX_API` enabled which is not a prefered
292+ * configuration for the Zephyr port.
293+ *
294+ * NOTE: If Zephyr later exposes `struct timespec` without requiring
295+ * CONFIG_POSIX_API, this definition should be replaced by an alias.
296+ */
297+ typedef struct {
298+ int64_t tv_sec ;
299+ long tv_nsec ;
300+ } os_timespec ;
301+
285302
286303#ifndef CLOCK_REALTIME
287304#define CLOCK_REALTIME 1
You can’t perform that action at this time.
0 commit comments