From: Nathan Froyd Date: Mon, 3 Aug 2009 14:32:12 +0000 (-0700) Subject: check for PR_SET_NAME being defined X-Git-Tag: pull-nvme-20200902~14963 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=6ca8d0fd51154c37b571ea74dd0b3e7a60ab847a;p=qemu-nvme.git 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: --- 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;