Re: [PATCH] Fix build issue due to Introduce nat/linux-namespaces.[ch] patch

Peter Bergner
2015-07-14T15:50:08Z

On Tue, 2015-07-14 at 15:46 +0100, Gary Benson wrote:
> I'd prefer it without the nested conditionals:
>
> #ifdef HAVE_SETNS
> return setns (fd, nstype);
> #elif defined __NR_setns
> return syscall (__NR_setns, fd, nstype);
> #else
> errno = ENOSYS;
> return -1;
> #endif
>
> Otherwise ok. Thanks for doing this work!

Hmmm, for some reason I thought #elif wasn't supported, since I
agree this looks better. Maybe I was thinking of some scripting
language limitation? Anyway, I committed the patch with your
suggested change. Thanks!

Peter