summaryrefslogtreecommitdiffstats
path: root/usr.sbin/iscsid
diff options
context:
space:
mode:
authortedu <tedu@openbsd.org>2016-08-16 18:41:57 +0000
committertedu <tedu@openbsd.org>2016-08-16 18:41:57 +0000
commitf75ac03558ed21fb615961669e98397e4fc7d0a2 (patch)
tree77cfd7b9aa99efe71c85fd9fa625a8af52bdc0b2 /usr.sbin/iscsid
parentAdd HISTORY. (diff)
downloadwireguard-openbsd-f75ac03558ed21fb615961669e98397e4fc7d0a2.tar.xz
wireguard-openbsd-f75ac03558ed21fb615961669e98397e4fc7d0a2.zip
stop including sys/param.h for nitems. define locally as needed.
ok natano reyk
Diffstat (limited to 'usr.sbin/iscsid')
-rw-r--r--usr.sbin/iscsid/iscsid.c3
-rw-r--r--usr.sbin/iscsid/iscsid.h6
-rw-r--r--usr.sbin/iscsid/util.c3
-rw-r--r--usr.sbin/iscsid/vscsi.c3
4 files changed, 8 insertions, 7 deletions
diff --git a/usr.sbin/iscsid/iscsid.c b/usr.sbin/iscsid/iscsid.c
index 4a02c2aa387..ae8bb8b8525 100644
--- a/usr.sbin/iscsid/iscsid.c
+++ b/usr.sbin/iscsid/iscsid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: iscsid.c,v 1.18 2015/01/16 15:57:06 deraadt Exp $ */
+/* $OpenBSD: iscsid.c,v 1.19 2016/08/16 18:41:57 tedu Exp $ */
/*
* Copyright (c) 2009 Claudio Jeker <claudio@openbsd.org>
@@ -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>
diff --git a/usr.sbin/iscsid/iscsid.h b/usr.sbin/iscsid/iscsid.h
index af5a57c0383..cf9497123df 100644
--- a/usr.sbin/iscsid/iscsid.h
+++ b/usr.sbin/iscsid/iscsid.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: iscsid.h,v 1.14 2014/05/10 11:30:47 claudio Exp $ */
+/* $OpenBSD: iscsid.h,v 1.15 2016/08/16 18:41:57 tedu Exp $ */
/*
* Copyright (c) 2009 Claudio Jeker <claudio@openbsd.org>
@@ -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.
diff --git a/usr.sbin/iscsid/util.c b/usr.sbin/iscsid/util.c
index 904365deb2a..ef9711c3e94 100644
--- a/usr.sbin/iscsid/util.c
+++ b/usr.sbin/iscsid/util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: util.c,v 1.7 2016/03/20 00:01:22 krw Exp $ */
+/* $OpenBSD: util.c,v 1.8 2016/08/16 18:41:57 tedu Exp $ */
/*
* Copyright (c) 2009 Claudio Jeker <claudio@openbsd.org>
@@ -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>
diff --git a/usr.sbin/iscsid/vscsi.c b/usr.sbin/iscsid/vscsi.c
index 4ca0893528b..dc8d5ed67e0 100644
--- a/usr.sbin/iscsid/vscsi.c
+++ b/usr.sbin/iscsid/vscsi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vscsi.c,v 1.16 2015/12/02 16:37:10 mmcc Exp $ */
+/* $OpenBSD: vscsi.c,v 1.17 2016/08/16 18:41:57 tedu Exp $ */
/*
* Copyright (c) 2009 Claudio Jeker <claudio@openbsd.org>
@@ -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>