Add support for DragonFly BSD
This commit is contained in:
parent
bee59c68c5
commit
9ebd5a6aff
13
etc/rc.conf.DragonFly
Normal file
13
etc/rc.conf.DragonFly
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
##############################################################################
|
||||||
|
# DragonFly BSD SPECIFIC OPTIONS
|
||||||
|
|
||||||
|
# This is the subsystem type. Valid options on DragonFly BSD:
|
||||||
|
# "" - nothing special
|
||||||
|
# "jail" - DragonFly BSD jails
|
||||||
|
# "prefix" - Prefix
|
||||||
|
# If this is commented out, automatic detection will be used.
|
||||||
|
#
|
||||||
|
# This should be set to the value representing the environment this file is
|
||||||
|
# PRESENTLY in, not the virtualization the environment is capable of.
|
||||||
|
#rc_sys=""
|
||||||
|
|
6
mk/os-DragonFly.mk
Normal file
6
mk/os-DragonFly.mk
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
# Copyright (c) 2008 Roy Marples <roy@marples.name>
|
||||||
|
# Released under the 2-clause BSD license.
|
||||||
|
|
||||||
|
# Generic definitions
|
||||||
|
|
||||||
|
include ${MK}/os-BSD.mk
|
@ -164,9 +164,15 @@ librc_hidden_def(rc_find_pids)
|
|||||||
# endif
|
# endif
|
||||||
# define _KINFO_PROC kinfo_proc
|
# define _KINFO_PROC kinfo_proc
|
||||||
# define _KVM_GETARGV kvm_getargv
|
# define _KVM_GETARGV kvm_getargv
|
||||||
|
# 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_UID(kp) (kp.ki_ruid)
|
||||||
# define _GET_KINFO_COMM(kp) (kp.ki_comm)
|
# define _GET_KINFO_COMM(kp) (kp.ki_comm)
|
||||||
# define _GET_KINFO_PID(kp) (kp.ki_pid)
|
# define _GET_KINFO_PID(kp) (kp.ki_pid)
|
||||||
|
# endif
|
||||||
# define _KVM_PATH _PATH_DEVNULL
|
# define _KVM_PATH _PATH_DEVNULL
|
||||||
# define _KVM_FLAGS O_RDONLY
|
# define _KVM_FLAGS O_RDONLY
|
||||||
# endif
|
# endif
|
||||||
|
@ -41,7 +41,7 @@ void rc_plugin_unload(void);
|
|||||||
void rc_plugin_run(RC_HOOK, const char *value);
|
void rc_plugin_run(RC_HOOK, const char *value);
|
||||||
|
|
||||||
/* dlfunc defines needed to avoid ISO errors. FreeBSD has this right :) */
|
/* dlfunc defines needed to avoid ISO errors. FreeBSD has this right :) */
|
||||||
#ifndef __FreeBSD__
|
#if !defined(__FreeBSD__) && !defined(__DragonFly__)
|
||||||
struct __dlfunc_arg {
|
struct __dlfunc_arg {
|
||||||
int __dlfunc_dummy;
|
int __dlfunc_dummy;
|
||||||
};
|
};
|
||||||
|
@ -110,6 +110,7 @@ extern char **environ;
|
|||||||
#if !defined(SYS_ioprio_set) && defined(__NR_ioprio_set)
|
#if !defined(SYS_ioprio_set) && defined(__NR_ioprio_set)
|
||||||
# define SYS_ioprio_set __NR_ioprio_set
|
# define SYS_ioprio_set __NR_ioprio_set
|
||||||
#endif
|
#endif
|
||||||
|
#if !defined(__DragonFly__)
|
||||||
static inline int ioprio_set(int which, int who, int ioprio)
|
static inline int ioprio_set(int which, int who, int ioprio)
|
||||||
{
|
{
|
||||||
#ifdef SYS_ioprio_set
|
#ifdef SYS_ioprio_set
|
||||||
@ -118,6 +119,7 @@ static inline int ioprio_set(int which, int who, int ioprio)
|
|||||||
return 0;
|
return 0;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static void
|
static void
|
||||||
free_schedulelist(void)
|
free_schedulelist(void)
|
||||||
|
Loading…
Reference in New Issue
Block a user