Message ID | 20150616084033.GB15889@blade.nx |
---|---|
State | New, archived |
Headers |
Received: (qmail 78918 invoked by alias); 16 Jun 2015 08:40:37 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: <gdb-patches.sourceware.org> List-Unsubscribe: <mailto:gdb-patches-unsubscribe-##L=##H@sourceware.org> List-Subscribe: <mailto:gdb-patches-subscribe@sourceware.org> List-Archive: <http://sourceware.org/ml/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-help@sourceware.org>, <http://sourceware.org/ml/#faqs> Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 78904 invoked by uid 89); 16 Jun 2015 08:40:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 16 Jun 2015 08:40:36 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 05572B7CF2; Tue, 16 Jun 2015 08:40:34 +0000 (UTC) Received: from blade.nx (ovpn-116-89.ams2.redhat.com [10.36.116.89]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t5G8eYlM006712; Tue, 16 Jun 2015 04:40:34 -0400 Received: by blade.nx (Postfix, from userid 1000) id 88356262FB5; Tue, 16 Jun 2015 09:40:33 +0100 (BST) Date: Tue, 16 Jun 2015 09:40:33 +0100 From: Gary Benson <gbenson@redhat.com> To: Michael Eager <eager@eagerm.com> Cc: gdb-patches@sourceware.org, Pedro Alves <palves@redhat.com>, Doug Evans <dje@google.com>, Iago =?iso-8859-1?Q?L=F3pez?= Galeiras <iago@endocode.com> Subject: Re: [PATCH 2/9 v2] Introduce nat/linux-namespaces.[ch] Message-ID: <20150616084033.GB15889@blade.nx> References: <1429186791-6867-1-git-send-email-gbenson@redhat.com> <1430395542-16017-3-git-send-email-gbenson@redhat.com> <557EE8F7.5090706@eagerm.com> <557F4DE3.6020306@eagerm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <557F4DE3.6020306@eagerm.com> X-IsSubscribed: yes |
Commit Message
Gary Benson
June 16, 2015, 8:40 a.m. UTC
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. > > > > This 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. Cheers, Gary --
Comments
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. >>> >>> This 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. > > Cheers, > Gary > > -- > 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.
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
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