Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Add roundup2 definition for compatibility with systems not having it
Baptiste Daroussin committed 7 years ago
commit da8bd070607b33346181fd64992917f780224777
parent 62371d5
1 file changed +4 -0
modified libpkg/private/pkg.h
@@ -73,6 +73,10 @@
#define nitems(x)       (sizeof((x)) / sizeof((x)[0]))
#endif

+
#ifndef roundup2
+
#define	roundup2(x, y)	(((x)+((y)-1))&(~((y)-1))) /* if y is powers of two */
+
#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)