From bf3516fa924447f4fd5c129753507bc5748312e8 Mon Sep 17 00:00:00 2001 From: Nathan Froyd Date: Mon, 3 Aug 2009 07:32:12 -0700 Subject: 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 Signed-off-by: Anthony Liguori Message-Id: --- vl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vl.c b/vl.c index ba8814a27b..4b3bc1154b 100644 --- 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; -- cgit v1.2.1