aboutsummaryrefslogtreecommitdiff
path: root/libbacktrace/fileline.c
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/fileline.c
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/fileline.c')
-rw-r--r--libbacktrace/fileline.c3
1 files changed, 2 insertions, 1 deletions
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: