aboutsummaryrefslogtreecommitdiff
path: root/src/librc/librc-daemon.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/librc/librc-daemon.c')
-rw-r--r--src/librc/librc-daemon.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/librc/librc-daemon.c b/src/librc/librc-daemon.c
index 982da354..6e7d57fd 100644
--- a/src/librc/librc-daemon.c
+++ b/src/librc/librc-daemon.c
@@ -164,9 +164,15 @@ librc_hidden_def(rc_find_pids)
# endif
# define _KINFO_PROC kinfo_proc
# define _KVM_GETARGV kvm_getargv
-# define _GET_KINFO_UID(kp) (kp.ki_ruid)
-# define _GET_KINFO_COMM(kp) (kp.ki_comm)
-# define _GET_KINFO_PID(kp) (kp.ki_pid)
+# if defined(__DragonFly__)
+# define _GET_KINFO_UID(kp) (kp.kp_ruid)
+# define _GET_KINFO_COMM(kp) (kp.kp_comm)
+# define _GET_KINFO_PID(kp) (kp.kp_pid)
+# else
+# define _GET_KINFO_UID(kp) (kp.ki_ruid)
+# define _GET_KINFO_COMM(kp) (kp.ki_comm)
+# define _GET_KINFO_PID(kp) (kp.ki_pid)
+# endif
# define _KVM_PATH _PATH_DEVNULL
# define _KVM_FLAGS O_RDONLY
# endif