about summary refs log tree commit diff
path: root/src/misc/setdomainname.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2012-09-09 16:50:20 -0400
committerRich Felker <dalias@aerifal.cx>2012-09-09 16:50:20 -0400
commitc87584a3e962dabd7b97733bfc3700e003d87d28 (patch)
tree38a6cde52df84db52a86b686da88f3ecc77c7c9a /src/misc/setdomainname.c
parenta660180c6a93681c6efb54fb5826c08d4df60208 (diff)
downloadmusl-c87584a3e962dabd7b97733bfc3700e003d87d28.tar.gz
musl-c87584a3e962dabd7b97733bfc3700e003d87d28.tar.xz
musl-c87584a3e962dabd7b97733bfc3700e003d87d28.zip
add setdomainname syscall, fix getdomainname (previously a stub)
Diffstat (limited to 'src/misc/setdomainname.c')
-rw-r--r--src/misc/setdomainname.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/misc/setdomainname.c b/src/misc/setdomainname.c
new file mode 100644
index 00000000..22d3f746
--- /dev/null
+++ b/src/misc/setdomainname.c
@@ -0,0 +1,8 @@
+#define _GNU_SOURCE
+#include <unistd.h>
+#include "syscall.h"
+
+int setdomainname(const char *name, size_t len)
+{
+	return syscall(SYS_setdomainname, name, len);
+}