diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2018-04-11 23:43:19 -0500 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2023-05-05 21:21:37 -0500 |
commit | 7acad7856885dd41270a047a336ad1e7ff6cb4c0 (patch) | |
tree | e757e79c3cde79754da845463c4149abc2fa2b51 /src | |
parent | 10c3cdac03aa3ccbeb00ba96b237c69db831364f (diff) | |
download | musl-7acad7856885dd41270a047a336ad1e7ff6cb4c0.tar.gz musl-7acad7856885dd41270a047a336ad1e7ff6cb4c0.tar.bz2 musl-7acad7856885dd41270a047a336ad1e7ff6cb4c0.tar.xz musl-7acad7856885dd41270a047a336ad1e7ff6cb4c0.zip |
pathconf: add _PC_TIMESTAMP_RESOLUTION
Right now, this is a worst-case assumption; some kernels may actually
have a value of 100000 here (100 Hz timers). This is considered the
easiest implementation.
This is required to be present in <unistd.h>.
Diffstat (limited to 'src')
-rw-r--r-- | src/conf/fpathconf.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/conf/fpathconf.c b/src/conf/fpathconf.c index e6aca5cf..b6a9d63e 100644 --- a/src/conf/fpathconf.c +++ b/src/conf/fpathconf.c @@ -4,7 +4,7 @@ long fpathconf(int fd, int name) { - static const short values[] = { + static const long values[] = { [_PC_LINK_MAX] = _POSIX_LINK_MAX, [_PC_MAX_CANON] = _POSIX_MAX_CANON, [_PC_MAX_INPUT] = _POSIX_MAX_INPUT, @@ -25,7 +25,8 @@ long fpathconf(int fd, int name) [_PC_REC_XFER_ALIGN] = 4096, [_PC_ALLOC_SIZE_MIN] = 4096, [_PC_SYMLINK_MAX] = -1, - [_PC_2_SYMLINKS] = 1 + [_PC_2_SYMLINKS] = 1, + [_PC_TIMESTAMP_RESOLUTION] = 100000000, }; if (name >= sizeof(values)/sizeof(values[0])) { errno = EINVAL; |