This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix build issue due to Introduce nat/linux-namespaces.[ch] patch
- From: Peter Bergner <bergner at vnet dot ibm dot com>
- To: Gary Benson <gbenson at redhat dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Tue, 14 Jul 2015 10:49:59 -0500
- Subject: Re: [PATCH] Fix build issue due to Introduce nat/linux-namespaces.[ch] patch
- Authentication-results: sourceware.org; auth=none
- References: <1436474110 dot 5367 dot 27 dot camel at otta> <20150714144641 dot GC26999 at blade dot nx>
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