From 8c74a31fe22de516f93612668a867e3066022bfc Mon Sep 17 00:00:00 2001 From: Matias Nitsche Date: Mon, 15 Jun 2020 12:29:05 -0300 Subject: [PATCH] vfs: fix support for PTY when CONFIG_NET is not enabled --- fs/vfs/fs_open.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/fs/vfs/fs_open.c b/fs/vfs/fs_open.c index 5193c4b97f..185a581bcf 100644 --- a/fs/vfs/fs_open.c +++ b/fs/vfs/fs_open.c @@ -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