This is an automated email from the ASF dual-hosted git repository. xiaoxiang781216 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 9a64b30312f688f45d9057c37e4d796506b10d76 Author: anpeiyun <[email protected]> AuthorDate: Mon Sep 15 10:43:50 2025 +0800 libc/unistd: Add _PC_NO_TRUNC to pathconf(). Add support for _PC_NO_TRUNC in fpathconf/pathconf. Signed-off-by: anpeiyun <[email protected]> Signed-off-by: ganjing <[email protected]> --- include/unistd.h | 2 +- libs/libc/unistd/lib_pathconf.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/include/unistd.h b/include/unistd.h index e57569b400d..3c359bf908e 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -182,7 +182,7 @@ /* Execution time constants (not supported) */ #define _POSIX_CHOWN_RESTRICTED 1 -#undef _POSIX_NO_TRUNC +#define _POSIX_NO_TRUNC 1 /* The value of a c_cc entry of struct termios that disables the special * character. diff --git a/libs/libc/unistd/lib_pathconf.c b/libs/libc/unistd/lib_pathconf.c index 93eab5cb945..19c1dd687a2 100644 --- a/libs/libc/unistd/lib_pathconf.c +++ b/libs/libc/unistd/lib_pathconf.c @@ -163,6 +163,9 @@ long fpathconf(int fildes, int name) case _PC_2_SYMLINKS: return -1; + case _PC_NO_TRUNC: + return _POSIX_NO_TRUNC; + default: if (name >= 0) {
