[PATCH 09/10] debugger.c: correct return type from getppid() (Solaris support)
Blake Jones
blakej at foo.net
Sat Nov 3 20:16:01 PDT 2012
Cast the return value of getppid() to "int" from "pid_t" in debugger.c,
since it is being passed to sprintf("%d"), which wants an "int"
argument. On Solaris, "pid_t" is a "long" for 32-bit programs.
---
debugger.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/debugger.c b/debugger.c
index e8b9378..8ff13d6 100644
--- a/debugger.c
+++ b/debugger.c
@@ -36,7 +36,7 @@ debugger_is_active (void)
if (RUNNING_ON_VALGRIND)
return TRUE;
- sprintf (buf, "/proc/%d/exe", getppid ());
+ sprintf (buf, "/proc/%d/exe", (int) getppid ());
if (readlink (buf, buf, sizeof (buf)) != -1 &&
strncmp (basename (buf), "gdb", 3) == 0)
{
--
1.7.9.2
More information about the notmuch
mailing list