summaryrefslogtreecommitdiff
path: root/procps
diff options
context:
space:
mode:
authorDenis Vlasenko2008-04-17 18:04:38 +0000
committerDenis Vlasenko2008-04-17 18:04:38 +0000
commite96dcb4dcffc8ade4c4f812ab2ed63287faaec83 (patch)
treef228d9a9d39410a9f6f877e133c8de798020edfc /procps
parent250aa5bb015061787e62f63847df04f377af91c1 (diff)
downloadbusybox-e96dcb4dcffc8ade4c4f812ab2ed63287faaec83.zip
busybox-e96dcb4dcffc8ade4c4f812ab2ed63287faaec83.tar.gz
top: fix build failure
Diffstat (limited to 'procps')
-rw-r--r--procps/top.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/procps/top.c b/procps/top.c
index e3f91c8..206f9e8 100644
--- a/procps/top.c
+++ b/procps/top.c
@@ -861,17 +861,22 @@ int top_main(int argc ATTRIBUTE_UNUSED, char **argv)
#else
qsort(top, ntop, sizeof(top_status_t), (void*)(sort_function[0]));
#endif /* FEATURE_TOP_CPU_USAGE_PERCENTAGE */
- } else { /* TOPMEM */
+ }
+#if ENABLE_FEATURE_TOPMEM
+ else { /* TOPMEM */
qsort(topmem, ntop, sizeof(topmem_status_t), (void*)topmem_sort);
}
+#endif
count = lines;
if (OPT_BATCH_MODE || count > ntop) {
count = ntop;
}
if (scan_mask == TOP_MASK)
display_process_list(count, col);
+#if ENABLE_FEATURE_TOPMEM
else
display_topmem_process_list(count, col);
+#endif
clearmems();
if (iterations >= 0 && !--iterations)
break;