[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [COMMIT 6ca8d0f] check for PR_SET_NAME being defined

From: Anthony Liguori
Subject: [Qemu-commits] [COMMIT 6ca8d0f] check for PR_SET_NAME being defined
Date: Mon, 10 Aug 2009 21:48:55 -0000

From: Nathan Froyd <address@hidden>

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 <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>

diff --git a/vl.c b/vl.c
index 978041f..8b2b289 100644
--- a/vl.c
+++ b/vl.c
@@ -301,7 +301,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)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]