Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Add compatibility for systems without nitems() defined
Baptiste Daroussin committed 7 years ago
commit 62371d58a31a7aa1920de9b2eadd88ae3726aaf8
parent 2a717e6
1 file changed +4 -0
modified libpkg/private/pkg.h
@@ -69,6 +69,10 @@
# endif
#endif

+
#ifndef nitems
+
#define nitems(x)       (sizeof((x)) / sizeof((x)[0]))
+
#endif
+

#if ARCHIVE_VERSION_NUMBER < 3000002
#define archive_write_add_filter_xz(a) archive_write_set_compression_xz(a)
#define archive_write_add_filter_bzip2(a) archive_write_set_compression_bzip2(a)