This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 2/9 v2] Introduce nat/linux-namespaces.[ch]
- From: Gary Benson <gbenson at redhat dot com>
- To: Michael Eager <eager at eagerm dot com>
- Cc: gdb-patches at sourceware dot org, Pedro Alves <palves at redhat dot com>, Doug Evans <dje at google dot com>, Iago López Galeiras <iago at endocode dot com>
- Date: Wed, 17 Jun 2015 10:51:50 +0100
- Subject: Re: [PATCH 2/9 v2] Introduce nat/linux-namespaces.[ch]
- Authentication-results: sourceware.org; auth=none
- References: <1429186791-6867-1-git-send-email-gbenson at redhat dot com> <1430395542-16017-3-git-send-email-gbenson at redhat dot com> <557EE8F7 dot 5090706 at eagerm dot com> <557F4DE3 dot 6020306 at eagerm dot com> <20150616084033 dot GB15889 at blade dot nx> <55803077 dot 9050509 at eagerm dot com>
Michael Eager wrote:
> On 06/16/2015 01:40 AM, Gary Benson wrote:
> > Michael Eager wrote:
> > > On 06/15/2015 08:02 AM, Michael Eager wrote:
> > > > On 04/30/2015 05:05 AM, Gary Benson wrote:
> > > > > This commit introduces new shared files linux-namespaces.[ch]
> > > > > containing code to support Linux namespaces that will be used
> > > > > by both GDB and gdbserver.
> > > >
> > > > Tis patch causes a build failure in nat/linux-namespaces.c with
> > > > glibc-2.5, which does not define MSG_CMSG_CLOEXEC. It looks like
> > > > this symbol was introduced in glib-2.7.
> > >
> > > Here is a patch which allows this to compile if the symbol is not
> > > defined.
> > [snip]
> >
> > Looks good, though maybe with a comment (below).
> > Please commit this.
> >
> > --
> > diff --git a/gdb/nat/linux-namespaces.c b/gdb/nat/linux-namespaces.c
> > index f18e40d..a7a3e4d 100644
> > --- a/gdb/nat/linux-namespaces.c
> > +++ b/gdb/nat/linux-namespaces.c
> > @@ -47,6 +47,12 @@ setns (int fd, int nstype)
> > }
> > #endif
> >
> > +/* Handle systems without MSG_CMSG_CLOEXEC. */
> > +
> > +#ifndef MSG_CMSG_CLOEXEC
> > +#define MSG_CMSG_CLOEXEC 0
> > +#endif
> > +
> > /* A Linux namespace. */
> >
> > struct linux_ns
>
> Committed: 4da680addb9.
Thanks Michael.
Cheers,
Gary
--
http://gbenson.net/