Make declaration of _TCB idempotent

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4156 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2011-12-10 13:46:37 +00:00
parent f4c7bd94b2
commit eab386aeda
2 changed files with 13 additions and 0 deletions

View File

@ -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

View File

@ -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() */