aboutsummaryrefslogtreecommitdiff
path: root/procps
diff options
context:
space:
mode:
Diffstat (limited to 'procps')
-rw-r--r--procps/pmap.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/procps/pmap.c b/procps/pmap.c
index c8fa0d280..9e541c707 100644
--- a/procps/pmap.c
+++ b/procps/pmap.c
@@ -37,6 +37,12 @@
37# define DASHES "--------" 37# define DASHES "--------"
38#endif 38#endif
39 39
40#if ULLONG_MAX == 0xffffffff
41# define AFMTLL "8"
42#else
43# define AFMTLL "16"
44#endif
45
40enum { 46enum {
41 OPT_x = 1 << 0, 47 OPT_x = 1 << 0,
42 OPT_q = 1 << 1, 48 OPT_q = 1 << 1,
@@ -46,7 +52,7 @@ static void print_smaprec(struct smaprec *currec, void *data)
46{ 52{
47 unsigned opt = (uintptr_t)data; 53 unsigned opt = (uintptr_t)data;
48 54
49 printf("%0" AFMT "lx ", currec->smap_start); 55 printf("%0" AFMTLL "llx ", currec->smap_start);
50 56
51 if (opt & OPT_x) 57 if (opt & OPT_x)
52 printf("%7lu %7lu %7lu %7lu ", 58 printf("%7lu %7lu %7lu %7lu ",