From b4d378adb8744fe88ca40308a2d33a4a49a3bcfe Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Thu, 16 Feb 2017 09:53:13 -0600 Subject: [PATCH] Don't build libc/pthread if pthreasa are disable. Fix a warning in dirent logic if mountpoints are disabled. --- fs/dirent/fs_opendir.c | 4 ++++ libc/pthread/Make.defs | 7 ++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/fs/dirent/fs_opendir.c b/fs/dirent/fs_opendir.c index 62b39d4410..43b62b9c87 100644 --- a/fs/dirent/fs_opendir.c +++ b/fs/dirent/fs_opendir.c @@ -227,7 +227,9 @@ FAR DIR *opendir(FAR const char *path) FAR struct inode *inode = NULL; FAR struct fs_dirent_s *dir; struct inode_search_s desc; +#ifndef CONFIG_DISABLE_MOUNTPOINT FAR const char *relpath = NULL; +#endif bool isroot = false; int ret; @@ -260,7 +262,9 @@ FAR DIR *opendir(FAR const char *path) { inode = desc.node; DEBUGASSERT(inode != NULL); +#ifndef CONFIG_DISABLE_MOUNTPOINT relpath = desc.relpath; +#endif } } diff --git a/libc/pthread/Make.defs b/libc/pthread/Make.defs index f5eab2b943..7f40ce7e73 100644 --- a/libc/pthread/Make.defs +++ b/libc/pthread/Make.defs @@ -33,6 +33,8 @@ # ############################################################################ +ifneq ($(CONFIG_DISABLE_PTHREAD),y) + # Add the pthread C files to the build CSRCS += pthread_attr_init.c pthread_attr_destroy.c @@ -54,9 +56,6 @@ ifeq ($(CONFIG_SMP),y) CSRCS += pthread_attr_getaffinity.c pthread_attr_setaffinity.c endif -ifeq ($(CONFIG_MUTEX_TYPES),y) -endif - ifeq ($(CONFIG_BUILD_PROTECTED),y) CSRCS += pthread_startup.c endif @@ -65,3 +64,5 @@ endif DEPPATH += --dep-path pthread VPATH += :pthread + +endif