svn commit: r363932 - head/usr.sbin/pmcstat

Mateusz Guzik mjg at FreeBSD.org
Wed Aug 5 20:42:09 UTC 2020


Author: mjg
Date: Wed Aug  5 20:42:08 2020
New Revision: 363932
URL: https://svnweb.freebsd.org/changeset/base/363932

Log:
  pmcstat: fix build on non-64 bit platforms

Modified:
  head/usr.sbin/pmcstat/pmcpl_callgraph.c

Modified: head/usr.sbin/pmcstat/pmcpl_callgraph.c
==============================================================================
--- head/usr.sbin/pmcstat/pmcpl_callgraph.c	Wed Aug  5 19:34:13 2020	(r363931)
+++ head/usr.sbin/pmcstat/pmcpl_callgraph.c	Wed Aug  5 20:42:08 2020	(r363932)
@@ -58,6 +58,7 @@ __FBSDID("$FreeBSD$");
 #include <errno.h>
 #include <fcntl.h>
 #include <gelf.h>
+#include <inttypes.h>
 #include <libgen.h>
 #include <limits.h>
 #include <netdb.h>
@@ -501,7 +502,7 @@ pmcstat_cgnode_topprint(struct pmcstat_cgnode *cg,
 			    (void *)(cg->pcg_image->pi_vaddr + cg->pcg_func));
 			break;
 		case FLAG_SHOW_OFFSET:
-			snprintf(ns, sizeof(ns), "%s+%#0lx",
+			snprintf(ns, sizeof(ns), "%s+%#0" PRIx64,
 			    pmcstat_string_unintern(sym->ps_name),
 			    cg->pcg_func - sym->ps_start);
 			break;


More information about the svn-src-all mailing list