From 576a62ad9196583936cbaa168a704dec2f8cefae Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Mon, 9 Jul 2012 08:56:01 +0000 Subject: need a private copy of nitems() --- usr.sbin/relayd/relayd.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'usr.sbin/relayd/relayd.h') diff --git a/usr.sbin/relayd/relayd.h b/usr.sbin/relayd/relayd.h index c34c1e52580..8e6ec446b97 100644 --- a/usr.sbin/relayd/relayd.h +++ b/usr.sbin/relayd/relayd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: relayd.h,v 1.154 2012/05/08 15:10:15 benno Exp $ */ +/* $OpenBSD: relayd.h,v 1.155 2012/07/09 08:56:00 deraadt Exp $ */ /* * Copyright (c) 2006, 2007 Pierre-Yves Ritschard @@ -24,6 +24,10 @@ #include #include +#ifndef nitems +#define nitems(_a) (sizeof((_a)) / sizeof((_a)[0])) +#endif + #define CONF_FILE "/etc/relayd.conf" #define RELAYD_SOCKET "/var/run/relayd.sock" #define PF_SOCKET "/dev/pf" -- cgit v1.2.3