From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 100384 invoked by alias); 16 Jun 2015 14:19:39 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 100352 invoked by uid 89); 16 Jun 2015 14:19:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-HELO: homiemail-a81.g.dreamhost.com Received: from sub5.mail.dreamhost.com (HELO homiemail-a81.g.dreamhost.com) (208.113.200.129) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 16 Jun 2015 14:19:37 +0000 Received: from homiemail-a81.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a81.g.dreamhost.com (Postfix) with ESMTP id 74AC1A8072; Tue, 16 Jun 2015 07:19:36 -0700 (PDT) Received: from vm-fedora21.eagercon.com (c-24-7-16-38.hsd1.ca.comcast.net [24.7.16.38]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: eager@eagerm.com) by homiemail-a81.g.dreamhost.com (Postfix) with ESMTPSA id 43A49A8020; Tue, 16 Jun 2015 07:19:36 -0700 (PDT) Message-ID: <55803077.9050509@eagerm.com> Date: Tue, 16 Jun 2015 14:19:00 -0000 From: Michael Eager User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Gary Benson CC: gdb-patches@sourceware.org, Pedro Alves , Doug Evans , =?UTF-8?B?SWFnbyBMw7NwZXogR2FsZWlyYXM=?= Subject: Re: [PATCH 2/9 v2] Introduce nat/linux-namespaces.[ch] 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> <20150616084033.GB15889@blade.nx> In-Reply-To: <20150616084033.GB15889@blade.nx> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-06/txt/msg00345.txt.bz2 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 eager@eagercon.com 1960 Park Blvd., Palo Alto, CA 94306 650-325-8077