aboutsummaryrefslogtreecommitdiff
path: root/libbacktrace
diff options
context:
space:
mode:
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>2017-07-28 16:26:39 +0000
committerRainer Orth <ro@gcc.gnu.org>2017-07-28 16:26:39 +0000
commitcf311b03558e7f12ad10b1678320a005914c60ce (patch)
tree3c81309d8d7e77943cbf5617df3679989b31ae04 /libbacktrace
parent8acb8421b9b828ab4b6fd9e544a35ce1e39607ed (diff)
downloadgcc-cf311b03558e7f12ad10b1678320a005914c60ce.zip
gcc-cf311b03558e7f12ad10b1678320a005914c60ce.tar.gz
gcc-cf311b03558e7f12ad10b1678320a005914c60ce.tar.bz2
Fix pid_t printing
* fileline.c (fileline_initialize): Print pid_t as long. From-SVN: r250675
Diffstat (limited to 'libbacktrace')
-rw-r--r--libbacktrace/ChangeLog4
-rw-r--r--libbacktrace/fileline.c3
2 files changed, 6 insertions, 1 deletions
diff --git a/libbacktrace/ChangeLog b/libbacktrace/ChangeLog
index 52154f0..c60f714 100644
--- a/libbacktrace/ChangeLog
+++ b/libbacktrace/ChangeLog
@@ -1,3 +1,7 @@
+2017-07-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * fileline.c (fileline_initialize): Print pid_t as long.
+
2017-07-26 Tony Reix <tony.reix@atos.net>
* configure.ac: Check for XCOFF32/XCOFF64. Check for loadquery.
diff --git a/libbacktrace/fileline.c b/libbacktrace/fileline.c
index 303e4dc..6812058 100644
--- a/libbacktrace/fileline.c
+++ b/libbacktrace/fileline.c
@@ -102,7 +102,8 @@ fileline_initialize (struct backtrace_state *state,
filename = "/proc/curproc/file";
break;
case 4:
- snprintf (buf, sizeof (buf), "/proc/%d/object/a.out", getpid ());
+ snprintf (buf, sizeof (buf), "/proc/%ld/object/a.out",
+ (long) getpid ());
filename = buf;
break;
default: