Skip to content

Commit

Permalink
libc/sysconf: add _SC_GETPW_R_SIZE_MAX
Browse files Browse the repository at this point in the history
  • Loading branch information
Cccccczj authored and xiaoxiang781216 committed Aug 29, 2024
1 parent a763ed1 commit 1086a05
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@
#undef _POSIX_MEMLOCK_RANGE
#undef _POSIX_FSYNC
#define _POSIX_SYNCHRONIZED_IO 1
#ifdef CONFIG_LIBC_PASSWD_LINESIZE
# define _POSIX_GETPW_R_SIZE_MAX CONFIG_LIBC_PASSWD_LINESIZE
#endif

#define _POSIX_VERSION 201712L
#define _POSIX_PRIORITIZED_IO _POSIX_VERSION
Expand Down
4 changes: 4 additions & 0 deletions libs/libc/unistd/lib_sysconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,10 @@ long sysconf(int name)
return _POSIX_PRIORITIZED_IO;
case _SC_AIO_MAX:
return _POSIX_AIO_MAX;
#ifdef CONFIG_LIBC_PASSWD_LINESIZE
case _SC_GETPW_R_SIZE_MAX:
return _POSIX_GETPW_R_SIZE_MAX;
#endif
case _SC_CPUTIME:
return _POSIX_CPUTIME;
case _SC_THREAD_CPUTIME:
Expand Down

0 comments on commit 1086a05

Please sign in to comment.