2004-12-02 Ralf Corsepius <ralf.corsepius@rtems.org>

* libnetworking/kern/kern_sysctl.c,
	libnetworking/sys/sysctl.h: Add SYSCTL_CHILDREN_SET
	(Update from FreeBSD for GCC-4.0.0).
This commit is contained in:
Ralf Corsepius
2004-12-03 02:23:20 +00:00
parent 78219ad15b
commit 46a1aa9efa
3 changed files with 10 additions and 3 deletions

View File

@@ -1,3 +1,9 @@
2004-12-02 Ralf Corsepius <ralf.corsepius@rtems.org>
* libnetworking/kern/kern_sysctl.c,
libnetworking/sys/sysctl.h: Add SYSCTL_CHILDREN_SET
(Update from FreeBSD for GCC-4.0.0).
2004-12-02 Joel Sherrill <joel@OARcorp.com>
* libnetworking/kern/kern_sysctl.c, libnetworking/netinet/ip_mroute.c,

View File

@@ -392,9 +392,8 @@ sysctl_add_oid(struct sysctl_ctx_list *clist, struct sysctl_oid_list *parent,
oidp->oid_kind = CTLFLAG_DYN | kind;
if ((kind & CTLTYPE) == CTLTYPE_NODE) {
/* Allocate space for children */
/* Later accessed by macro SYSCTL_CHILDREN(oidp) */
oidp->oid_arg1 = malloc(sizeof(struct sysctl_oid_list),
M_SYSCTLOID, M_WAITOK);
SYSCTL_CHILDREN_SET(oidp, malloc(sizeof(struct sysctl_oid_list),
M_SYSCTLOID, M_WAITOK));
SLIST_INIT(SYSCTL_CHILDREN(oidp));
} else {
oidp->oid_arg1 = arg1;

View File

@@ -180,6 +180,8 @@ void sysctl_unregister_oid(struct sysctl_oid *oidp);
/* Hide these in macros */
#define SYSCTL_CHILDREN(oid_ptr) (struct sysctl_oid_list *) \
(oid_ptr)->oid_arg1
#define SYSCTL_CHILDREN_SET(oid_ptr, val) \
(oid_ptr)->oid_arg1 = (val);
#define SYSCTL_STATIC_CHILDREN(oid_name) \
(&sysctl_##oid_name##_children)