about summary refs log tree commit diff
path: root/src/linux/sethostname.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/linux/sethostname.c')
-rw-r--r--src/linux/sethostname.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/linux/sethostname.c b/src/linux/sethostname.c
new file mode 100644
index 00000000..f61e0cb4
--- /dev/null
+++ b/src/linux/sethostname.c
@@ -0,0 +1,8 @@
+#include <unistd.h>
+#define SYSCALL_STANDALONE
+#include "syscall.h"
+
+int sethostname(const char *name, size_t len)
+{
+	return syscall2(__NR_sethostname, (long)name, len);
+}