diff --git a/include/nuttx/sched.h b/include/nuttx/sched.h
index 3fa2eace633980f1585ebde1f9bc295bb197d7c4..b08e60953aa8b1ef4668753d166f9ec6df99d8e7 100644
--- a/include/nuttx/sched.h
+++ b/include/nuttx/sched.h
@@ -180,7 +180,9 @@ struct _TCB
   tstate_t task_state;                   /* Current state of the thread         */
   uint16   flags;                        /* Misc. general status flags          */
   sint16   lockcount;                    /* 0=preemptable (not-locked)          */
+#ifndef CONFIG_DISABLE_PTHREAD
   FAR void *joininfo;                    /* Detach-able info to support join    */
+#endif
 #if CONFIG_RR_INTERVAL > 0
   int      timeslice;                    /* RR timeslice interval remaining     */
 #endif