git: f2ee207dd4ea - main - chaltroot(2)/fchaltroot(2): make accessible to userspace

From: Konstantin Belousov <kib_at_FreeBSD.org>
Date: Fri, 20 Nov 2026 15:10:52 UTC
The branch main has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=f2ee207dd4ea96cbfe6e43194963e91cc856fe96

commit f2ee207dd4ea96cbfe6e43194963e91cc856fe96
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2026-09-25 23:51:10 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-11-20 15:10:26 +0000

    chaltroot(2)/fchaltroot(2): make accessible to userspace
    
    Reviewed by:    markj
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
    Differential revision:  https://reviews.freebsd.org/D60035
---
 include/unistd.h          | 2 ++
 lib/libsys/Symbol.sys.map | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/include/unistd.h b/include/unistd.h
index adb658dc0086..bfd50fe5e377 100644
--- a/include/unistd.h
+++ b/include/unistd.h
@@ -516,6 +516,7 @@ struct crypt_data {
 
 int	 acct(const char *);
 int	 async_daemon(void);
+int	 chaltroot(const char *);
 int	 check_utility_compat(const char *);
 int	 close_range(unsigned int, unsigned int, int);
 ssize_t	 copy_file_range(int, off_t *, int, off_t *, size_t, unsigned int);
@@ -531,6 +532,7 @@ int	 execvP(const char *, const char *, char * const *);
 int	 execvpe(const char *, char * const *, char * const *);
 int	 feature_present(const char *);
 int	 fchroot(int);
+int	 fchaltroot(int);
 char	*fflagstostr(u_long);
 ssize_t	 freadlink(int fd, char *buf, size_t bufsize);
 int	 getdomainname(char *, int);
diff --git a/lib/libsys/Symbol.sys.map b/lib/libsys/Symbol.sys.map
index f77b2a807471..657cf23b67c7 100644
--- a/lib/libsys/Symbol.sys.map
+++ b/lib/libsys/Symbol.sys.map
@@ -391,6 +391,8 @@ FBSD_1.8 {
 };
 
 FBSD_1.9 {
+	chaltroot;
+	fchaltroot;
 	kexec_load;
 	pddupfd;
 	pdopenpid;