diff --git a/Makefile.am b/Makefile.am index 80527829..fe70eef1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -192,9 +192,10 @@ dragonflybsd_platform_headers = \ dragonflybsd/ProcessField.h if HTOP_DRAGONFLYBSD -AM_LDFLAGS += -lkvm -lkinfo -myhtopplatsources = dragonflybsd/Platform.c dragonflybsd/DragonFlyBSDProcessList.c \ -dragonflybsd/DragonFlyBSDProcess.c +myhtopplatsources = \ + dragonflybsd/Platform.c \ + dragonflybsd/DragonFlyBSDProcessList.c \ + dragonflybsd/DragonFlyBSDProcess.c myhtopplatheaders = $(dragonflybsd_platform_headers) endif diff --git a/configure.ac b/configure.ac index f303ff03..8b68c8e9 100644 --- a/configure.ac +++ b/configure.ac @@ -247,6 +247,10 @@ if test "$my_htop_platform" = "darwin"; then AC_CHECK_FUNCS([mach_timebase_info]) fi +if test "$my_htop_platform" = "dragonflybsd"; then + AC_CHECK_LIB([kvm], [kvm_open], [], [missing_libraries="$missing_libraries libkvm"]) +fi + if test "$my_htop_platform" = "freebsd"; then AC_CHECK_LIB([kvm], [kvm_open], [], [missing_libraries="$missing_libraries libkvm"]) fi diff --git a/dragonflybsd/DragonFlyBSDProcessList.c b/dragonflybsd/DragonFlyBSDProcessList.c index fd19df30..07fceefa 100644 --- a/dragonflybsd/DragonFlyBSDProcessList.c +++ b/dragonflybsd/DragonFlyBSDProcessList.c @@ -431,7 +431,7 @@ void ProcessList_goThroughEntries(ProcessList* super, bool pauseProcessUpdate) { } proc->m_virt = kproc->kp_vm_map_size / ONE_K; - proc->m_resident = kproc->kp_vm_rssize * pageSizeKB; + proc->m_resident = kproc->kp_vm_rssize * pageSizeKb; proc->nlwp = kproc->kp_nthreads; // number of lwp thread proc->time = (kproc->kp_swtime + 5000) / 10000; diff --git a/dragonflybsd/DragonFlyBSDProcessList.h b/dragonflybsd/DragonFlyBSDProcessList.h index 682971e9..f2c7ce70 100644 --- a/dragonflybsd/DragonFlyBSDProcessList.h +++ b/dragonflybsd/DragonFlyBSDProcessList.h @@ -11,8 +11,6 @@ in the source distribution for its full text. #include #include #include -#include -#include #include #include #include