Add {get,set}domainname(2)
{get,set}domainname aren't in POSIX but are widely-implemented
extensions.
The Linux kernel provides a setdomainname syscall but not a symmetric
getdomainname syscall, since it expects userspace to get the domain name
from uname(2).
Change-Id: I96726c242f4bb646c130b361688328b0b97269a0
Signed-off-by: Greg Hackmann <ghackmann@google.com>
diff --git a/libc/include/unistd.h b/libc/include/unistd.h
index 5045267..2d62c1f 100644
--- a/libc/include/unistd.h
+++ b/libc/include/unistd.h
@@ -292,6 +292,9 @@
__errordecl(__readlinkat_size_toobig_error, "readlinkat called with size > SSIZE_MAX");
extern ssize_t __readlinkat_real(int dirfd, const char*, char*, size_t) __RENAME(readlinkat);
+extern int getdomainname(char*, size_t);
+extern int setdomainname(const char*, size_t);
+
#if defined(__BIONIC_FORTIFY)
__BIONIC_FORTIFY_INLINE