blob: 65d0a78d75df21ede5d60893b3df1438567d81f7 [file] [log] [blame]
Fei Jiea067b8d2016-03-31 16:06:49 +08001#include "tests.h"
2#include <sys/syscall.h>
3
4#ifdef __NR_sethostname
5
Fei Jiea067b8d2016-03-31 16:06:49 +08006# include <stdio.h>
7# include <unistd.h>
8
9int
10main(void)
11{
Dmitry V. Levin60b91872016-04-21 21:22:50 +000012 long rc = syscall(__NR_sethostname, 0, 63);
13 printf("sethostname(NULL, 63) = %ld %s (%m)\n",
14 rc, errno2name());
Fei Jiea067b8d2016-03-31 16:06:49 +080015
16 puts("+++ exited with 0 +++");
17 return 0;
18}
19
20#else
21
22SKIP_MAIN_UNDEFINED("__NR_sethostname")
23
24#endif