qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] check for PR_SET_NAME being defined
@ 2009-07-21 14:15 Nathan Froyd
  2009-07-22 15:04 ` Anthony Liguori
  0 siblings, 1 reply; 4+ messages in thread
From: Nathan Froyd @ 2009-07-21 14:15 UTC (permalink / raw)
  To: qemu-devel

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.
---
 vl.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/vl.c b/vl.c
index ce213c2..61f7711 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;
-- 
1.6.2.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread
* [Qemu-devel] [PATCH] check for PR_SET_NAME being defined
@ 2009-08-03 14:32 Nathan Froyd
  0 siblings, 0 replies; 4+ messages in thread
From: Nathan Froyd @ 2009-08-03 14:32 UTC (permalink / raw)
  To: qemu-devel

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>
---
 vl.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

v2: resent, including Signed-off-by this time.

diff --git a/vl.c b/vl.c
index fdd4f03..0f07ca9 100644
--- a/vl.c
+++ b/vl.c
@@ -300,7 +300,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;
-- 
1.6.3.2

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-08-03 14:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-21 14:15 [Qemu-devel] [PATCH] check for PR_SET_NAME being defined Nathan Froyd
2009-07-22 15:04 ` Anthony Liguori
2009-07-22 15:49   ` Nathan Froyd
  -- strict thread matches above, loose matches on Subject: below --
2009-08-03 14:32 Nathan Froyd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).