vfs: fix support for PTY when CONFIG_NET is not enabled

This commit is contained in:
Matias Nitsche 2020-06-15 12:29:05 -03:00 committed by Xiang Xiao
parent 53387b53c6
commit 8c74a31fe2

View File

@ -271,8 +271,11 @@ int nx_vopen(FAR const char *path, int oflags, va_list ap)
*/
fd = (int)OPEN_GETFD(ret);
DEBUGASSERT((unsigned)fd < (CONFIG_NFILE_DESCRIPTORS +
CONFIG_NSOCKET_DESCRIPTORS));
DEBUGASSERT((unsigned)fd < (CONFIG_NFILE_DESCRIPTORS
#ifdef CONFIG_NET
+ CONFIG_NSOCKET_DESCRIPTORS
#endif
));
}
#endif