should not be using secret kernel interfaces in userland.
Index: httpd/httpd.c
===================================================================
RCS file: /cvs/src/usr.sbin/httpd/httpd.c,v
retrieving revision 1.56
diff -u -p -r1.56 httpd.c
--- httpd/httpd.c 10 Jun 2016 12:09:48 -0000 1.56
+++ httpd/httpd.c 16 Aug 2016 17:47:20 -0000
@@ -16,7 +16,6 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <sys/param.h> /* nitems */
#include <sys/types.h>
#include <sys/queue.h>
#include <sys/socket.h>
Index: httpd/httpd.h
===================================================================
RCS file: /cvs/src/usr.sbin/httpd/httpd.h,v
retrieving revision 1.106
diff -u -p -r1.106 httpd.h
--- httpd/httpd.h 15 Aug 2016 16:12:34 -0000 1.106
+++ httpd/httpd.h 16 Aug 2016 17:51:46 -0000
@@ -38,6 +38,10 @@
#include "patterns.h"
+#ifndef nitems
+#define nitems(_a) (sizeof((_a)) / sizeof((_a)[0]))
+#endif
+
#define CONF_FILE "/etc/httpd.conf"
#define HTTPD_SOCKET "/var/run/httpd.sock"
#define HTTPD_USER "www"
Index: httpd/logger.c
===================================================================
RCS file: /cvs/src/usr.sbin/httpd/logger.c,v
retrieving revision 1.15
diff -u -p -r1.15 logger.c
--- httpd/logger.c 2 Dec 2015 15:13:00 -0000 1.15
+++ httpd/logger.c 16 Aug 2016 17:47:22 -0000
@@ -16,7 +16,6 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <sys/param.h> /* nitems */
#include <sys/types.h>
#include <sys/queue.h>
#include <sys/uio.h>
Index: httpd/server.c
===================================================================
RCS file: /cvs/src/usr.sbin/httpd/server.c,v
retrieving revision 1.88
diff -u -p -r1.88 server.c
--- httpd/server.c 15 Aug 2016 16:12:34 -0000 1.88
+++ httpd/server.c 16 Aug 2016 17:51:46 -0000
@@ -16,7 +16,6 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <sys/param.h> /* nitems */
#include <sys/types.h>
#include <sys/queue.h>
#include <sys/time.h>
Index: iscsictl/iscsictl.c
===================================================================
RCS file: /cvs/src/usr.sbin/iscsictl/iscsictl.c,v
retrieving revision 1.10
diff -u -p -r1.10 iscsictl.c
--- iscsictl/iscsictl.c 11 Nov 2015 02:55:12 -0000 1.10
+++ iscsictl/iscsictl.c 16 Aug 2016 17:48:37 -0000
@@ -16,7 +16,6 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <sys/param.h> /* nitems */
#include <sys/queue.h>
#include <sys/socket.h>
#include <sys/uio.h>
Index: iscsid/iscsid.c
===================================================================
RCS file: /cvs/src/usr.sbin/iscsid/iscsid.c,v
retrieving revision 1.18
diff -u -p -r1.18 iscsid.c
--- iscsid/iscsid.c 16 Jan 2015 15:57:06 -0000 1.18
+++ iscsid/iscsid.c 16 Aug 2016 17:48:06 -0000
@@ -16,7 +16,6 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <sys/param.h> /* nitems */
#include <sys/queue.h>
#include <sys/socket.h>
#include <sys/sysctl.h>
Index: iscsid/iscsid.h
===================================================================
RCS file: /cvs/src/usr.sbin/iscsid/iscsid.h,v
retrieving revision 1.14
diff -u -p -r1.14 iscsid.h
--- iscsid/iscsid.h 10 May 2014 11:30:47 -0000 1.14
+++ iscsid/iscsid.h 16 Aug 2016 17:47:52 -0000
@@ -38,6 +38,10 @@
#define PDU_LEN(x) ((((x) + 3) / 4) * 4)
+#ifndef nitems
+#define nitems(_a) (sizeof((_a)) / sizeof((_a)[0]))
+#endif
+
/*
* Common control message header.
* A message can consist of up to 3 parts with specified length.
Index: iscsid/util.c
===================================================================
RCS file: /cvs/src/usr.sbin/iscsid/util.c,v
retrieving revision 1.7
diff -u -p -r1.7 util.c
--- iscsid/util.c 20 Mar 2016 00:01:22 -0000 1.7
+++ iscsid/util.c 16 Aug 2016 17:48:02 -0000
@@ -16,7 +16,6 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <sys/param.h> /* nitems */
#include <sys/queue.h>
#include <sys/socket.h>
#include <sys/uio.h>
Index: iscsid/vscsi.c
===================================================================
RCS file: /cvs/src/usr.sbin/iscsid/vscsi.c,v
retrieving revision 1.16
diff -u -p -r1.16 vscsi.c
--- iscsid/vscsi.c 2 Dec 2015 16:37:10 -0000 1.16
+++ iscsid/vscsi.c 16 Aug 2016 17:48:04 -0000
@@ -16,7 +16,6 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <sys/param.h> /* for nitems */
#include <sys/ioctl.h>
#include <sys/queue.h>
#include <sys/socket.h>
Index: snmpd/snmpd.c
===================================================================
RCS file: /cvs/src/usr.sbin/snmpd/snmpd.c,v
retrieving revision 1.32
diff -u -p -r1.32 snmpd.c
--- snmpd/snmpd.c 2 Feb 2016 17:51:11 -0000 1.32
+++ snmpd/snmpd.c 16 Aug 2016 17:49:23 -0000
@@ -16,7 +16,6 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <sys/param.h> /* nitems */
#include <sys/types.h>
#include <sys/queue.h>
#include <sys/socket.h>
Index: snmpd/snmpd.h
===================================================================
RCS file: /cvs/src/usr.sbin/snmpd/snmpd.h,v
retrieving revision 1.66
diff -u -p -r1.66 snmpd.h
--- snmpd/snmpd.h 7 Dec 2015 12:33:08 -0000 1.66
+++ snmpd/snmpd.h 16 Aug 2016 17:49:00 -0000
@@ -36,6 +36,10 @@
#include "ber.h"
#include "snmp.h"
+#ifndef nitems
+#define nitems(_a) (sizeof((_a)) / sizeof((_a)[0]))
+#endif
+
/*
* common definitions for snmpd
*/
Index: snmpd/snmpe.c
===================================================================
RCS file: /cvs/src/usr.sbin/snmpd/snmpe.c,v
retrieving revision 1.41
diff -u -p -r1.41 snmpe.c
--- snmpd/snmpe.c 8 Oct 2015 08:17:30 -0000 1.41
+++ snmpd/snmpe.c 16 Aug 2016 17:49:25 -0000
@@ -16,7 +16,6 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#include <sys/param.h> /* nitems */
#include <sys/queue.h>
#include <sys/types.h>
#include <sys/stat.h>
Index: snmpd/traphandler.c
===================================================================
RCS file: /cvs/src/usr.sbin/snmpd/traphandler.c,v
retrieving revision 1.4
diff -u -p -r1.4 traphandler.c
--- snmpd/traphandler.c 7 Dec 2015 12:33:08 -0000 1.4
+++ snmpd/traphandler.c 16 Aug 2016 17:49:26 -0000
@@ -17,7 +17,6 @@
*/
#include <sys/queue.h>
-#include <sys/param.h> /* nitems */
#include <sys/socket.h>
#include <sys/socketvar.h>
#include <sys/stat.h>
Index: syslogd/ttymsg.c
===================================================================
RCS file: /cvs/src/usr.sbin/syslogd/ttymsg.c,v
retrieving revision 1.10
diff -u -p -r1.10 ttymsg.c
--- syslogd/ttymsg.c 2 Apr 2016 19:55:10 -0000 1.10
+++ syslogd/ttymsg.c 16 Aug 2016 17:50:41 -0000
@@ -30,7 +30,6 @@
* SUCH DAMAGE.
*/
-#include <sys/param.h> /* nitems */
#include <sys/stat.h>
#include <dirent.h>
@@ -44,6 +43,10 @@
#include <unistd.h>
#include "syslogd.h"
+
+#ifndef nitems
+#define nitems(_a) (sizeof((_a)) / sizeof((_a)[0]))
+#endif
struct tty_delay {
struct event td_event;