From fee0587660993f85111ac8bb0cde3bf159936be2 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Thu, 13 Jan 2022 08:19:36 -0600 Subject: defines: introduce APK_DEFAULT_ABI_TAG for most cases, this replaces APK_DEFAULT_ARCH. if apk-tools is built without a configured abi-tag, the ABI tag is equivalent to APK_DEFAULT_ARCH, providing backwards compatibility with apk v2 the /etc/apk/arch configuration file is assumed to actually describe an ABI tag. --- src/apk_defines.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/apk_defines.h b/src/apk_defines.h index 9cacf13..e7fe34c 100644 --- a/src/apk_defines.h +++ b/src/apk_defines.h @@ -142,6 +142,12 @@ static inline int IS_ERR(const void *ptr) { return (unsigned long)ptr >= (unsign #error APK_DEFAULT_ARCH not detected for this architecture #endif +#ifndef APK_ABI_TAG +#define APK_DEFAULT_ABI_TAG APK_DEFAULT_ARCH +#else +#define APK_DEFAULT_ABI_TAG APK_ABI_TAG "-" APK_DEFAULT_ARCH +#endif + #define APK_MAX_REPOS 32 /* see struct apk_package */ #define APK_MAX_TAGS 16 /* see solver; unsigned short */ #define APK_CACHE_CSUM_BYTES 4 -- cgit v1.2.3-70-g09d2