diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2017-09-03 19:44:07 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2017-09-03 19:44:07 +0200 |
commit | 6547ec0ad8451d72e43ba4ea38c2300c67eb501a (patch) | |
tree | d5c03073fb8484a6f6edf8c5ee849031fe881b69 /resolv/tst-resolv-res_init-skeleton.c | |
parent | hurd: Fix build ot misc/tst-preadvwritev2-common.c (diff) | |
download | glibc-6547ec0ad8451d72e43ba4ea38c2300c67eb501a.tar.gz glibc-6547ec0ad8451d72e43ba4ea38c2300c67eb501a.tar.bz2 glibc-6547ec0ad8451d72e43ba4ea38c2300c67eb501a.zip |
hurd: fix resolv/tst-resolv-res_init-skeleton.c build
* resolv/tst-resolv-res_init-skeleton.c (run_res_init)
[!CLONE_NEWUTS]: Fail as unsupported if hostname is not NULL.
Diffstat (limited to 'resolv/tst-resolv-res_init-skeleton.c')
-rw-r--r-- | resolv/tst-resolv-res_init-skeleton.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/resolv/tst-resolv-res_init-skeleton.c b/resolv/tst-resolv-res_init-skeleton.c index 3b7b4129e3..a1bf110910 100644 --- a/resolv/tst-resolv-res_init-skeleton.c +++ b/resolv/tst-resolv-res_init-skeleton.c @@ -341,11 +341,15 @@ run_res_init (void *closure) setenv ("RES_OPTIONS", ctx->t->res_options, 1); if (ctx->t->hostname != NULL) { +#ifdef CLONE_NEWUTS /* This test needs its own namespace, to avoid changing the host name for the parent, too. */ TEST_VERIFY_EXIT (unshare (CLONE_NEWUTS) == 0); if (sethostname (ctx->t->hostname, strlen (ctx->t->hostname)) != 0) FAIL_EXIT1 ("sethostname (\"%s\"): %m", ctx->t->hostname); +#else + FAIL_UNSUPPORTED ("clone (CLONE_NEWUTS) not supported"); +#endif } switch (ctx->init) |