Make the inclusion of <sys/cprng.h> a private matter for sysctl. No reason

to expose the rest of the kernel to it.
This commit is contained in:
matt 2013-02-02 14:02:09 +00:00
parent 5b552bb2b4
commit 06924b3fe7
3 changed files with 12 additions and 6 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: init_sysctl.c,v 1.193 2012/10/27 17:18:39 chs Exp $ */
/* $NetBSD: init_sysctl.c,v 1.194 2013/02/02 14:02:09 matt Exp $ */
/*-
* Copyright (c) 2003, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@ -30,13 +30,15 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: init_sysctl.c,v 1.193 2012/10/27 17:18:39 chs Exp $");
__KERNEL_RCSID(0, "$NetBSD: init_sysctl.c,v 1.194 2013/02/02 14:02:09 matt Exp $");
#include "opt_sysv.h"
#include "opt_compat_netbsd.h"
#include "opt_modular.h"
#include "pty.h"
#define SYSCTL_PRIVATE
#include <sys/types.h>
#include <sys/param.h>
#include <sys/sysctl.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: kern_sysctl.c,v 1.238 2013/01/29 23:00:31 para Exp $ */
/* $NetBSD: kern_sysctl.c,v 1.239 2013/02/02 14:02:09 matt Exp $ */
/*-
* Copyright (c) 2003, 2007, 2008 The NetBSD Foundation, Inc.
@ -68,11 +68,13 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: kern_sysctl.c,v 1.238 2013/01/29 23:00:31 para Exp $");
__KERNEL_RCSID(0, "$NetBSD: kern_sysctl.c,v 1.239 2013/02/02 14:02:09 matt Exp $");
#include "opt_defcorename.h"
#include "ksyms.h"
#define SYSCTL_PRIVATE
#include <sys/param.h>
#define __COMPAT_SYSCTL
#include <sys/sysctl.h>

View File

@ -1,4 +1,4 @@
/* $NetBSD: sysctl.h,v 1.206 2013/01/03 13:19:32 dsl Exp $ */
/* $NetBSD: sysctl.h,v 1.207 2013/02/02 14:02:09 matt Exp $ */
/*
* Copyright (c) 1989, 1993
@ -61,7 +61,7 @@
#include <stdbool.h>
#endif
#ifdef _KERNEL
#ifdef SYSCTL_PRIVATE
#include <sys/cprng.h>
#endif
@ -1251,7 +1251,9 @@ MALLOC_DECLARE(M_SYSCTLDATA);
extern const u_int sysctl_lwpflagmap[];
#ifdef SYSCTL_PRIVATE
extern cprng_strong_t *sysctl_prng;
#endif
#else /* !_KERNEL */
#include <sys/cdefs.h>