From 86bb721d80dbe09522ad3ebbdac4e6d09efe70ee Mon Sep 17 00:00:00 2001 From: chao an Date: Tue, 26 Mar 2024 20:00:07 +0800 Subject: [PATCH] nuttx/mqueue: fix build break if disable posix message queue MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix build break if enable CONFIG_DISABLE_MQUEUE: In file included from sched/mqueue/mqueue.h:38, from group/group_leave.c:45: include/nuttx/mqueue.h:124:26: error: ‘CONFIG_FS_MQUEUE_NPOLLWAITERS’ undeclared here (not in a function); did you mean ‘CONFIG_SERIAL_NPOLLWAITERS’? 124 | FAR struct pollfd *fds[CONFIG_FS_MQUEUE_NPOLLWAITERS]; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | CONFIG_SERIAL_NPOLLWAITERS Signed-off-by: chao an --- include/nuttx/mqueue.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/nuttx/mqueue.h b/include/nuttx/mqueue.h index 1c4731d2a7..9f2226c173 100644 --- a/include/nuttx/mqueue.h +++ b/include/nuttx/mqueue.h @@ -78,6 +78,10 @@ # define _MQ_TIMEDRECEIVE(d,m,l,p,t) mq_timedreceive(d,m,l,p,t) #endif +#ifndef CONFIG_FS_MQUEUE_NPOLLWAITERS +# define CONFIG_FS_MQUEUE_NPOLLWAITERS 0 +#endif + #if CONFIG_FS_MQUEUE_NPOLLWAITERS > 0 # define nxmq_pollnotify(msgq, eventset) \ poll_notify(msgq->fds, CONFIG_FS_MQUEUE_NPOLLWAITERS, eventset)