From: Rainer Orth Date: Fri, 28 Jul 2017 16:26:39 +0000 (+0000) Subject: Fix pid_t printing X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cf311b03558e7f12ad10b1678320a005914c60ce;p=gcc.git Fix pid_t printing * fileline.c (fileline_initialize): Print pid_t as long. From-SVN: r250675 --- diff --git a/libbacktrace/ChangeLog b/libbacktrace/ChangeLog index 52154f01e82..c60f714aa20 100644 --- a/libbacktrace/ChangeLog +++ b/libbacktrace/ChangeLog @@ -1,3 +1,7 @@ +2017-07-28 Rainer Orth + + * fileline.c (fileline_initialize): Print pid_t as long. + 2017-07-26 Tony Reix * configure.ac: Check for XCOFF32/XCOFF64. Check for loadquery. diff --git a/libbacktrace/fileline.c b/libbacktrace/fileline.c index 303e4dce83a..68120583d7b 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: