summaryrefslogtreecommitdiff
path: root/libexec/ld.so/util.h
diff options
context:
space:
mode:
authorGreg Steuck <gnezdo@cvs.openbsd.org>2023-01-29 20:30:22 +0000
committerGreg Steuck <gnezdo@cvs.openbsd.org>2023-01-29 20:30:22 +0000
commit2aca5a2f038b7aa5a538d40cd77938b5f1ae6c0f (patch)
tree59e0d52e1c4d2a409b9be5a68a283c7dfb8d765c /libexec/ld.so/util.h
parent63a665decb4aefb5b11c7ff622b7782a8718705f (diff)
Unite all nitems copies in ld.so/util.h
OK deraadt
Diffstat (limited to 'libexec/ld.so/util.h')
-rw-r--r--libexec/ld.so/util.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/libexec/ld.so/util.h b/libexec/ld.so/util.h
index e4e749a0c83..d2f47baf1d7 100644
--- a/libexec/ld.so/util.h
+++ b/libexec/ld.so/util.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: util.h,v 1.37 2022/01/08 06:49:41 guenther Exp $ */
+/* $OpenBSD: util.h,v 1.38 2023/01/29 20:30:21 gnezdo Exp $ */
/*
* Copyright (c) 1998 Todd C. Miller <millert@openbsd.org>
@@ -77,6 +77,8 @@ __END_HIDDEN_DECLS
#define _dl_round_page(x) \
(((x) + ((1 << _MAX_PAGE_SHIFT) - 1)) & ~((1 << _MAX_PAGE_SHIFT) - 1))
+#define nitems(_a) (sizeof((_a)) / sizeof((_a)[0]))
+
/*
* The following functions are declared inline so they can
* be used before bootstrap linking has been finished.