diff --git a/components/libc/Kconfig b/components/libc/Kconfig index a2b8747ef6c0e5d4c47d197acf94802d3aeae2f1..04d59051b8a2984dbb3ac76b35bc7cccdc556205 100644 --- a/components/libc/Kconfig +++ b/components/libc/Kconfig @@ -43,18 +43,28 @@ config RT_USING_POSIX default n if RT_USING_POSIX - config RT_USING_POSIX_MMAP - bool "Enable mmap() API" + + config RT_USING_POSIX_POLL + bool "Enable poll()" default n - config RT_USING_POSIX_TERMIOS - bool "Enable termios APIs" + config RT_USING_POSIX_SELECT + bool "Enable select()" + select RT_USING_POSIX_POLL default n config RT_USING_POSIX_GETLINE bool "Enable getline()/getdelim() APIs" default n + config RT_USING_POSIX_MMAP + bool "Enable mmap() API" + default n + + config RT_USING_POSIX_TERMIOS + bool "Enable termios APIs" + default n + config RT_USING_POSIX_AIO bool "Enable AIO" default n diff --git a/components/libc/posix/src/SConscript b/components/libc/posix/src/SConscript index 8712d671c0e606f5e1877a60cbd3185fbb0184cb..384e71261ac967064d88f3e0f7cd5ec21a2a5647 100644 --- a/components/libc/posix/src/SConscript +++ b/components/libc/posix/src/SConscript @@ -2,10 +2,16 @@ from building import * -src = Glob('*.c') +src = ['libc.c','delay.c','unistd.c'] cwd = GetCurrentDir() CPPPATH = [cwd] +if GetDepend('RT_USING_POSIX_POLL'): + src += ['poll.c'] + +if GetDepend('RT_USING_POSIX_SELECT'): + src += ['select.c'] + group = DefineGroup('POSIX', src, depend = ['RT_USING_POSIX'], CPPPATH = CPPPATH) Return('group') diff --git a/components/net/Kconfig b/components/net/Kconfig index 4c49f4aa97ba3afcc90183cfd9b9185c143053c3..eaec96b931adae44dc61305725b314df03879933 100644 --- a/components/net/Kconfig +++ b/components/net/Kconfig @@ -42,6 +42,7 @@ config RT_USING_SAL bool "Enable BSD socket operated by file system API" default n select RT_LIBC_USING_FILEIO + select RT_USING_POSIX_SELECT help Let BSD socket operated by file system API, such as read/write and involveed in select/poll POSIX APIs.