Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Fix NetBSD ABI and suppress major version change warning
jrmarino committed 9 years ago
commit e6a725188b39331e2bf0ab2e4573ec7ab95d547b
parent b4e95f4
2 files changed +3 -1
modified libpkg/pkg.h.in
@@ -74,7 +74,7 @@ extern "C" {
#endif

#ifdef __NetBSD_Version__
-
#define OSMAJOR __NetBSD_Version__
+
#define OSMAJOR ((__NetBSD_Version__ + 1000000) / 100000000)
#endif

#ifndef __DECONST
modified libpkg/pkg_elf.c
@@ -787,6 +787,8 @@ pkg_get_myarch_elfparse(char *dest, size_t sz)
#if defined(__DragonFly__)
	snprintf(dest, sz, "%s:%d.%d",
	    osname, version / 100000, (((version / 100 % 1000)+1)/2)*2);
+
#elif defined(__NetBSD__)
+
	snprintf(dest, sz, "%s:%d", osname, (version + 1000000) / 100000000);
#else
	snprintf(dest, sz, "%s:%d", osname, version / 100000);
#endif