diff options
author | Gary <admin@garyshood.com> | 2013-07-23 00:07:23 -0500 |
---|---|---|
committer | William Hubbs <w.d.hubbs@gmail.com> | 2013-07-25 22:33:24 -0500 |
commit | 9ebd5a6aff73d70717f1d9a2f57767eae3eeb0c8 (patch) | |
tree | 0732c859b154ef706762cc205170cd2808230dfa /src/librc | |
parent | bee59c68c5ff5be426e68ecb603d4cc26542f4af (diff) |
Add support for DragonFly BSD
Diffstat (limited to 'src/librc')
-rw-r--r-- | src/librc/librc-daemon.c | 12 |
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 |