From patchwork Mon Aug 3 14:32:12 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Froyd X-Patchwork-Id: 30593 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by bilbo.ozlabs.org (Postfix) with ESMTPS id 509A2B707B for ; Tue, 4 Aug 2009 02:52:21 +1000 (EST) Received: from localhost ([127.0.0.1]:54473 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MY0lm-0003bB-DL for incoming@patchwork.ozlabs.org; Mon, 03 Aug 2009 12:52:18 -0400 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 Received: (qmail 9509 invoked from network); 3 Aug 2009 14:32:12 -0000 Received: from unknown (HELO localhost) (froydnj@127.0.0.2) by mail.codesourcery.com with ESMTPA; 3 Aug 2009 14:32:12 -0000 From: Nathan Froyd To: qemu-devel@nongnu.org Date: Mon, 3 Aug 2009 07:32:12 -0700 Message-Id: <1249309932-4549-1-git-send-email-froydnj@codesourcery.com> X-Mailer: git-send-email 1.6.3.2 X-Detected-Operating-System: by mx20.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Subject: [Qemu-devel] [PATCH] check for PR_SET_NAME being defined X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@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;