From 6c97edf46768ed0a34be4ba79c81a5a8182af995 Mon Sep 17 00:00:00 2001 From: mav Date: Sun, 20 Mar 2016 23:26:52 +0000 Subject: [PATCH] MFC r291637 (by bdrewery): Fix the build for non-amd64. git-svn-id: svn://svn.freebsd.org/base/stable/10@297088 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- cddl/contrib/opensolaris/cmd/plockstat/plockstat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cddl/contrib/opensolaris/cmd/plockstat/plockstat.c b/cddl/contrib/opensolaris/cmd/plockstat/plockstat.c index 8dfb0ba25..e21567be5 100644 --- a/cddl/contrib/opensolaris/cmd/plockstat/plockstat.c +++ b/cddl/contrib/opensolaris/cmd/plockstat/plockstat.c @@ -515,7 +515,7 @@ getsym(struct ps_prochandle *P, uintptr_t addr, char *buf, size_t size, if (P == NULL || Pxlookup_by_addr(P, addr, name, sizeof (name), &sym, &info) != 0) { - (void) snprintf(buf, size, "%#lx", addr); + (void) snprintf(buf, size, "%#lx", (unsigned long)addr); return (0); } #ifdef illumos @@ -537,7 +537,7 @@ getsym(struct ps_prochandle *P, uintptr_t addr, char *buf, size_t size, size -= len; if (sym.st_value != addr) - len = snprintf(buf, size, "+%#lx", addr - sym.st_value); + len = snprintf(buf, size, "+%#lx", (unsigned long)(addr - sym.st_value)); if (nolocks && strcmp("libc.so.1", map->pr_mapname) == 0 && (strstr("mutex", name) == 0 || -- 2.45.0