summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--components/dfs/KConfig14
-rw-r--r--components/dfs/filesystems/net/SConscript6
-rw-r--r--components/dfs/filesystems/net/select/sys/select.h (renamed from components/dfs/filesystems/net/sys/select.h)0
-rw-r--r--components/dfs/filesystems/net/socket/sys/socket.h (renamed from components/dfs/filesystems/net/sys/socket.h)0
4 files changed, 20 insertions, 0 deletions
diff --git a/components/dfs/KConfig b/components/dfs/KConfig
index 97379b3e4e..e7dfb2abb8 100644
--- a/components/dfs/KConfig
+++ b/components/dfs/KConfig
@@ -96,6 +96,20 @@ if RT_USING_DFS
help
Let BSD socket operated by file system API, such as read/write and involveed in select/poll POSIX APIs.
+ if RT_USING_DFS_NET
+ config HAVE_SYS_SELECT_H
+ bool "Toolchains/libc have provide sys/select.h"
+ default n
+ help
+ Toolchains/libc have provide sys/select.h file, therefore, disable the sys/select.h in RT-Thread.
+
+ config HAVE_SYS_SOCKET_H
+ bool "Toolchains/libc have provide sys/socket.h"
+ default n
+ help
+ Toolchains/libc have provide sys/socket.h file, therefore, disable the sys/socket.h in RT-Thread.
+ endif
+
config RT_USING_DFS_ROMFS
bool "Enable ReadOnly file system on flash"
default n
diff --git a/components/dfs/filesystems/net/SConscript b/components/dfs/filesystems/net/SConscript
index 810ca16fef..0b5e45c090 100644
--- a/components/dfs/filesystems/net/SConscript
+++ b/components/dfs/filesystems/net/SConscript
@@ -6,6 +6,12 @@ cwd = GetCurrentDir()
src = Glob('*.c')
CPPPATH = [cwd]
+if not GetDepend('HAVE_SYS_SELECT_H'):
+ CPPPATH += [cwd + '/select']
+
+if not GetDepend('HAVE_SYS_SOCKET_H'):
+ CPPPATH += [cwd + '/socket']
+
group = DefineGroup('Filesystem', src, depend = ['RT_USING_DFS', 'RT_USING_DFS_NET'], CPPPATH = CPPPATH)
Return('group')
diff --git a/components/dfs/filesystems/net/sys/select.h b/components/dfs/filesystems/net/select/sys/select.h
index ce91583904..ce91583904 100644
--- a/components/dfs/filesystems/net/sys/select.h
+++ b/components/dfs/filesystems/net/select/sys/select.h
diff --git a/components/dfs/filesystems/net/sys/socket.h b/components/dfs/filesystems/net/socket/sys/socket.h
index 89e0c5bfa5..89e0c5bfa5 100644
--- a/components/dfs/filesystems/net/sys/socket.h
+++ b/components/dfs/filesystems/net/socket/sys/socket.h