diff --git a/fs/mqueue/mq_open.c b/fs/mqueue/mq_open.c index 1529e67160..6f421a3166 100644 --- a/fs/mqueue/mq_open.c +++ b/fs/mqueue/mq_open.c @@ -370,6 +370,7 @@ static mqd_t nxmq_vopen(FAR const char *mq_name, int oflags, va_list ap) * Public Functions ****************************************************************************/ +#if CONFIG_FS_MQUEUE_NPOLLWAITERS > 0 void nxmq_pollnotify(FAR struct mqueue_inode_s *msgq, pollevent_t eventset) { int i; @@ -395,6 +396,7 @@ void nxmq_pollnotify(FAR struct mqueue_inode_s *msgq, pollevent_t eventset) } } } +#endif /**************************************************************************** * Name: file_mq_open diff --git a/include/nuttx/mqueue.h b/include/nuttx/mqueue.h index f834b31ce1..7ffe2d8d38 100644 --- a/include/nuttx/mqueue.h +++ b/include/nuttx/mqueue.h @@ -417,7 +417,11 @@ int nxmq_alloc_msgq(FAR struct mq_attr *attr, * ****************************************************************************/ +#if CONFIG_FS_MQUEUE_NPOLLWAITERS > 0 void nxmq_pollnotify(FAR struct mqueue_inode_s *msgq, pollevent_t eventset); +#else +# define nxmq_pollnotify(msgq, eventset) +#endif /**************************************************************************** * Name: file_mq_open