From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MTe4I-0006CQ-U1 for qemu-devel@nongnu.org; Wed, 22 Jul 2009 11:49:22 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MTe4D-0006C8-R3 for qemu-devel@nongnu.org; Wed, 22 Jul 2009 11:49:22 -0400 Received: from [199.232.76.173] (port=51502 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MTe4D-0006By-Nl for qemu-devel@nongnu.org; Wed, 22 Jul 2009 11:49:17 -0400 Received: from mx20.gnu.org ([199.232.41.8]:40961) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MTe4C-0000yS-Me for qemu-devel@nongnu.org; Wed, 22 Jul 2009 11:49:17 -0400 Received: from mail.codesourcery.com ([65.74.133.4]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MTe4A-0000r9-Lc for qemu-devel@nongnu.org; Wed, 22 Jul 2009 11:49:14 -0400 Date: Wed, 22 Jul 2009 08:49:09 -0700 From: Nathan Froyd Subject: Re: [Qemu-devel] [PATCH] check for PR_SET_NAME being defined Message-ID: <20090722154908.GD32566@codesourcery.com> References: <1248185708-23715-1-git-send-email-froydnj@codesourcery.com> <4A672A89.9080502@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4A672A89.9080502@codemonkey.ws> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org Depending on what glibc/kernel headers you are compiling against, PR_SET_NAME may or may not be defined. Do the right thing if PR_SET_NAME isn't defined and skip setting the process name. Signed-off-by: Nathan Froyd --- vl.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) [...thought format.signoff would work in all cases, but apparently not...] diff --git a/vl.c b/vl.c index ce213c2..61f7711 100644 --- a/vl.c +++ b/vl.c @@ -310,7 +310,7 @@ void hw_error(const char *fmt, ...) static void set_proc_name(const char *s) { -#ifdef __linux__ +#if defined(__linux__) && defined(PR_SET_NAME) char name[16]; if (!s) return; -- 1.6.2.4