diff options
| author | Brooks Davis <brooks@FreeBSD.org> | 2025-02-19 16:52:04 +0000 |
|---|---|---|
| committer | Brooks Davis <brooks@FreeBSD.org> | 2025-02-19 16:55:04 +0000 |
| commit | ed955671d2e844f274dd8245aa3c5c7e9dcdc77a (patch) | |
| tree | 46a877beee5754e260f77d6814949b0434fe38c9 /lib/libc/stdlib | |
| parent | 06016adaccca1958cdde4edf845f5b972be7ffc0 (diff) | |
Diffstat (limited to 'lib/libc/stdlib')
| -rw-r--r-- | lib/libc/stdlib/realpath.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/lib/libc/stdlib/realpath.c b/lib/libc/stdlib/realpath.c index 28348ea9e226..4c52b73319ab 100644 --- a/lib/libc/stdlib/realpath.c +++ b/lib/libc/stdlib/realpath.c @@ -28,21 +28,16 @@ * SUCH DAMAGE. */ -#include "namespace.h" #include <sys/param.h> #include <sys/stat.h> #include <errno.h> #include <fcntl.h> +#include <libsys.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <ssp/ssp.h> -#include "un-namespace.h" -#include "libc_private.h" - -extern int __realpathat(int fd, const char *path, char *buf, size_t size, - int flags); /* * Find the real name of path, by removing all ".", ".." and symlink @@ -224,9 +219,8 @@ __ssp_real(realpath)(const char * __restrict path, char * __restrict resolved) if (resolved == NULL) return (NULL); } - if (__getosreldate() >= 1300080) { - if (__realpathat(AT_FDCWD, path, resolved, PATH_MAX, 0) == 0) - return (resolved); + if (__sys___realpathat(AT_FDCWD, path, resolved, PATH_MAX, 0) == 0) { + return (resolved); } res = realpath1(path, resolved); if (res == NULL) |
