diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2012-07-08 11:48:21 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2012-07-08 11:48:21 +0000 |
commit | 915ed2205c0dd0458c433815cba83b22306dce47 (patch) | |
tree | b9eed211d84bd10669ab4b7b5de9623b7c09a168 /sbin/newfs_ext2fs | |
parent | 12e40267e6c681fb7cb06dfbc555ac47ccf2ec3d (diff) |
if you use nitems() in userland, you must define it yourself
discussed with guenther
Diffstat (limited to 'sbin/newfs_ext2fs')
-rw-r--r-- | sbin/newfs_ext2fs/extern.h | 6 |
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); |