summaryrefslogtreecommitdiff
path: root/sbin/newfs_ext2fs
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/newfs_ext2fs')
-rw-r--r--sbin/newfs_ext2fs/extern.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/sbin/newfs_ext2fs/extern.h b/sbin/newfs_ext2fs/extern.h
index 7613f1bc8a1..be60560acfd 100644
--- a/sbin/newfs_ext2fs/extern.h
+++ b/sbin/newfs_ext2fs/extern.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: extern.h,v 1.2 2010/02/16 12:25:35 otto Exp $ */
+/* $OpenBSD: extern.h,v 1.3 2012/07/08 11:48:20 deraadt Exp $ */
/* $NetBSD: extern.h,v 1.4 2009/10/21 01:07:46 snj Exp $ */
/*
@@ -29,6 +29,10 @@
#define EXT2_LOG_MAXBSIZE 12
#define EXT2_MAXBSIZE (1 << EXT2_LOG_MAXBSIZE)
+#ifndef nitems
+#define nitems(_a) (sizeof((_a)) / sizeof((_a)[0]))
+#endif
+
/* prototypes */
void mke2fs(const char *, int, int);