libc: add freadlink(3)

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D56365
This commit is contained in:
Konstantin Belousov
2026-04-12 11:56:26 +03:00
parent 2213820b6f
commit ae6a13deb8
4 changed files with 19 additions and 0 deletions
+1
View File
@@ -518,6 +518,7 @@ int execvpe(const char *, char * const *, char * const *);
int feature_present(const char *);
int fchroot(int);
char *fflagstostr(u_long);
ssize_t freadlink(int fd, char *buf, size_t bufsize);
int getdomainname(char *, int);
int getentropy(void *, size_t);
int getgrouplist(const char *, gid_t, gid_t *, int *);
+1
View File
@@ -56,6 +56,7 @@ SRCS+= \
fmtmsg.c \
fnmatch.c \
fpclassify.c \
freadlink.c \
frexp.c \
fstab.c \
ftok.c \
+1
View File
@@ -475,6 +475,7 @@ FBSD_1.8 {
};
FBSD_1.9 {
freadlink;
posix_spawn_file_actions_addchdir;
posix_spawn_file_actions_addfchdir;
posix_spawnattr_getexecfd_np;
+16
View File
@@ -0,0 +1,16 @@
/*-
* SPDX-License-Identifier: BSD-2-Clause
*
* Copyright 2026 The FreeBSD Foundation
*
* This software were developed by Konstantin Belousov <kib@FreeBSD.org>
* under sponsorship from the FreeBSD Foundation.
*/
#include <unistd.h>
ssize_t
freadlink(int fd, char *buf, size_t bufsize)
{
return (readlinkat(fd, "", buf, bufsize));
}