From ac9974c358f632a07adc1d52d69882410eec5e3e Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Mon, 13 May 2019 10:11:39 +0200 Subject: Add hostname related sysctls conditionally This helps to the reduce code size for USB only use cases. --- freebsd/sys/kern/kern_mib.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'freebsd') diff --git a/freebsd/sys/kern/kern_mib.c b/freebsd/sys/kern/kern_mib.c index cacf497d..52aa32fb 100644 --- a/freebsd/sys/kern/kern_mib.c +++ b/freebsd/sys/kern/kern_mib.c @@ -59,6 +59,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#ifdef __rtems__ +#include +#endif /* __rtems__ */ SYSCTL_ROOT_NODE(0, sysctl, CTLFLAG_RW, 0, "Sysctl internal magic"); @@ -280,6 +283,7 @@ SYSCTL_STRING(_kern, OID_AUTO, supported_archs, CTLFLAG_RD | CTLFLAG_MPSAFE, MACHINE_ARCH, 0, "Supported architectures for binaries"); #endif +#if defined(RTEMS_BSD_MODULE_NETINET) || defined(RTEMS_BSD_MODULE_NETINET6) static int sysctl_hostname(SYSCTL_HANDLER_ARGS) { @@ -356,6 +360,7 @@ SYSCTL_PROC(_kern, KERN_HOSTUUID, hostuuid, CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_PRISON | CTLFLAG_CAPRD | CTLFLAG_MPSAFE, (void *)(offsetof(struct prison, pr_hostuuid)), HOSTUUIDLEN, sysctl_hostname, "A", "Host UUID"); +#endif /* RTEMS_BSD_MODULE_NETINET || RTEMS_BSD_MODULE_NETINET6 */ #ifndef __rtems__ static int regression_securelevel_nonmonotonic = 0; -- cgit v1.2.3