diff options
-rw-r--r-- | sbin/disklabel/editor.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sbin/disklabel/editor.c b/sbin/disklabel/editor.c index 3e1e5ed6edd..d85387dafa5 100644 --- a/sbin/disklabel/editor.c +++ b/sbin/disklabel/editor.c @@ -1,4 +1,4 @@ -/* $OpenBSD: editor.c,v 1.218 2009/06/11 02:59:08 krw Exp $ */ +/* $OpenBSD: editor.c,v 1.219 2009/06/26 14:25:36 deraadt Exp $ */ /* * Copyright (c) 1997-2000 Todd C. Miller <Todd.Miller@courtesan.com> @@ -17,7 +17,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: editor.c,v 1.218 2009/06/11 02:59:08 krw Exp $"; +static char rcsid[] = "$OpenBSD: editor.c,v 1.219 2009/06/26 14:25:36 deraadt Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -102,6 +102,10 @@ const struct space_allocation alloc_stupid[] = { { MEG(1), MEG(2048), 100, "/" } }; +#ifndef nitems +#define nitems(_a) (sizeof((_a)) / sizeof((_a)[0])) +#endif + const struct { const struct space_allocation *table; int sz; |