aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Froyd <froydnj@codesourcery.com>2009-08-03 07:32:12 -0700
committerAnthony Liguori <aliguori@us.ibm.com>2009-08-10 13:11:27 -0500
commit6ca8d0fd51154c37b571ea74dd0b3e7a60ab847a (patch)
tree3cf73577a6243e9aab4342f9f755560acfa498c5
parentf6c64e0eea46f4083afd6f7c281cb24a3c1e2021 (diff)
check for PR_SET_NAME being defined
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:
-rw-r--r--vl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vl.c b/vl.c
index 978041f339..8b2b289031 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)
return;