From eab386aeda3b5f61441a7deae60afeded0ca1a5a Mon Sep 17 00:00:00 2001 From: patacongo Date: Sat, 10 Dec 2011 13:46:37 +0000 Subject: [PATCH] Make declaration of _TCB idempotent git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4156 42af7a65-404d-4744-a932-0658087f49c3 --- include/nuttx/fs.h | 5 +++++ include/nuttx/sched.h | 8 ++++++++ 2 files changed, 13 insertions(+) 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() */