diff --git a/include/nuttx/fs.h b/include/nuttx/fs.h index 4623475109..11f6a862a3 100644 --- a/include/nuttx/fs.h +++ b/include/nuttx/fs.h @@ -379,7 +379,12 @@ EXTERN int close_blockdriver(FAR struct inode *inode); /* Used by the OS to clone stdin, stdout, stderr */ #if CONFIG_NFILE_STREAMS > 0 + +#ifndef __TCB_DEFINED__ typedef struct _TCB _TCB; +#define __TCB_DEFINED__ +#endif + EXTERN FAR struct file_struct *fs_fdopen(int fd, int oflags, FAR _TCB *tcb); #endif diff --git a/include/nuttx/sched.h b/include/nuttx/sched.h index 3fc318a402..7d5fe16bf5 100644 --- a/include/nuttx/sched.h +++ b/include/nuttx/sched.h @@ -294,7 +294,15 @@ struct _TCB #endif }; + +/* Certain other header files may also define this time to avoid circular header + * file inclusion issues. + */ + +#ifndef __TCB_DEFINED__ typedef struct _TCB _TCB; +#define __TCB_DEFINED__ +#endif /* This is the callback type used by sched_foreach() */