]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
check for PR_SET_NAME being defined
authorNathan Froyd <froydnj@codesourcery.com>
Mon, 3 Aug 2009 14:32:12 +0000 (07:32 -0700)
committerAnthony Liguori <aliguori@us.ibm.com>
Fri, 28 Aug 2009 02:23:38 +0000 (21:23 -0500)
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 <froydnj@codesourcery.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Message-Id:

vl.c

diff --git a/vl.c b/vl.c
index ba8814a27bed63f62cd40a9213e891ab0a7114fd..4b3bc1154b11efc56f74d0c5ceac7acc3275a904 100644 (file)
--- 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;