From acca831c1114bb7d9943406aa74f918538d30bfc Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Tue, 26 Mar 2019 09:20:23 -0600 Subject: [PATCH] include/sys/select.h: Fix compiler error when CONFIG_NSOCKET_DESCRIPTORS is undefined. --- include/sys/select.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/sys/select.h b/include/sys/select.h index ba3b2551ee..9a357ac720 100644 --- a/include/sys/select.h +++ b/include/sys/select.h @@ -52,7 +52,11 @@ /* Get the total number of descriptors that we will have to support */ -#define FD_SETSIZE (CONFIG_NFILE_DESCRIPTORS + CONFIG_NSOCKET_DESCRIPTORS) +#ifdef CONFIG_NSOCKET_DESCRIPTORS +# define FD_SETSIZE (CONFIG_NFILE_DESCRIPTORS + CONFIG_NSOCKET_DESCRIPTORS) +#else +# define FD_SETSIZE CONFIG_NFILE_DESCRIPTORS +#endif /* We will use a 32-bit bitsets to represent the set of descriptors. How * many uint32_t's do we need to span all descriptors?