From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 66205 invoked by alias); 8 Jan 2016 10:49:25 -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 66186 invoked by uid 89); 8 Jan 2016 10:49:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-spam-relays-external:209.85.220.65, H*RU:209.85.220.65, mount X-HELO: mail-pa0-f65.google.com Received: from mail-pa0-f65.google.com (HELO mail-pa0-f65.google.com) (209.85.220.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 08 Jan 2016 10:49:23 +0000 Received: by mail-pa0-f65.google.com with SMTP id yy13so21417265pab.1 for ; Fri, 08 Jan 2016 02:49:23 -0800 (PST) X-Received: by 10.66.234.200 with SMTP id ug8mr81398995pac.129.1452250161744; Fri, 08 Jan 2016 02:49:21 -0800 (PST) Received: from E107787-LIN (gcc1-power7.osuosl.org. [140.211.15.137]) by smtp.gmail.com with ESMTPSA id t9sm3875866pfi.8.2016.01.08.02.49.18 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Fri, 08 Jan 2016 02:49:20 -0800 (PST) From: Yao Qi To: Gary Benson Cc: gdb-patches@sourceware.org, Eli Zaretskii , Pedro Alves , Doug Evans , Iago =?utf-8?Q?L?= =?utf-8?Q?=C3=B3pez?= Galeiras 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> Date: Fri, 08 Jan 2016 10:49:00 -0000 In-Reply-To: <1430395542-16017-3-git-send-email-gbenson@redhat.com> (Gary Benson's message of "Thu, 30 Apr 2015 13:05:35 +0100") Message-ID: <86si28wdlh.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2016-01/txt/msg00126.txt.bz2 Gary Benson writes: Hi Gary, > +/* Return an object representing the mount namespace helper process. > + If no mount namespace helper process has been started then start > + one. Return NULL if no mount namespace helper process could be > + started. */ > + > +static struct linux_mnsh * > +linux_mntns_get_helper (void) > +{ > + static struct linux_mnsh *helper =3D NULL; > + > + if (helper =3D=3D NULL) > + { > + static struct linux_mnsh h; > + struct linux_ns *ns; > + pid_t helper_creator =3D getpid (); > + int sv[2]; > + > + ns =3D linux_ns_get_namespace (LINUX_NS_MNT); > + if (ns =3D=3D NULL) > + return NULL; > + > + if (gdb_socketpair_cloexec (AF_UNIX, SOCK_STREAM, 0, sv) < 0) > + return NULL; > + > + h.pid =3D fork (); > + if (h.pid < 0) Function fork isn't available on uclinux target, so it causes a compilation error like this below. Since my work touches linux-bfin-low.c, I build GDBserver for bfin-uclinux, and the error is foun= d. cc1: warnings being treated as errors gdb/gdbserver/../nat/linux-namespaces.c: In function =E2=80=98linux_mntns_g= et_helper=E2=80=99: gdb/gdbserver/../nat/linux-namespaces.c:647: error: implicit declaration of= function =E2=80=98fork=E2=80=99 I don't know much about linux namespace stuff, so I didn't give a fix here. Could you have a look? --=20 Yao (=E9=BD=90=E5=B0=A7)