From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MXyaO-0008BX-Jp for qemu-devel@nongnu.org; Mon, 03 Aug 2009 10:32:24 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MXyaJ-00088D-Cx for qemu-devel@nongnu.org; Mon, 03 Aug 2009 10:32:23 -0400 Received: from [199.232.76.173] (port=41667 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MXyaI-000887-16 for qemu-devel@nongnu.org; Mon, 03 Aug 2009 10:32:18 -0400 Received: from mx20.gnu.org ([199.232.41.8]:46860) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MXyaH-0003o0-MJ for qemu-devel@nongnu.org; Mon, 03 Aug 2009 10:32:17 -0400 Received: from mail.codesourcery.com ([65.74.133.4]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MXyaG-0000gc-ML for qemu-devel@nongnu.org; Mon, 03 Aug 2009 10:32:17 -0400 From: Nathan Froyd Date: Mon, 3 Aug 2009 07:32:12 -0700 Message-Id: <1249309932-4549-1-git-send-email-froydnj@codesourcery.com> Subject: [Qemu-devel] [PATCH] check for PR_SET_NAME being defined List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: 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(-) v2: resent, including Signed-off-by this time. diff --git a/vl.c b/vl.c index fdd4f03..0f07ca9 100644 --- a/vl.c +++ b/vl.c @@ -300,7 +300,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.3.2