From: Ondřej Surý Date: Tue, 26 Aug 2025 04:53:27 +0000 (+0200) Subject: Workaround the compile failure on macOS X-Git-Tag: v9.21.12~27^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a274cf6ce6114f8db468742ffa04a141acd7de51;p=thirdparty%2Fbind9.git Workaround the compile failure on macOS The following check: __builtin_types_compatible_p(size_t, uint64_t) doesn't work with default compiler on macOS. Workaround the issue by typing the size_t to matching unsigned int type. --- diff --git a/lib/isc/include/isc/bit.h b/lib/isc/include/isc/bit.h index 0ef6a69c902..0a39c29eafb 100644 --- a/lib/isc/include/isc/bit.h +++ b/lib/isc/include/isc/bit.h @@ -153,11 +153,11 @@ }) #if SIZE_MAX == UINT64_MAX -#define ISC_ROTATE_LEFTSIZE(x, n) ISC_ROTATE_LEFT64(x, n) -#define ISC_ROTATE_RIGHTSIZE(x, n) ISC_ROTATE_RIGHT64(x, n) +#define ISC_ROTATE_LEFTSIZE(x, n) ISC_ROTATE_LEFT64((uint64_t)x, n) +#define ISC_ROTATE_RIGHTSIZE(x, n) ISC_ROTATE_RIGHT64((uint64_t)x, n) #elif SIZE_MAX == UINT32_MAX -#define ISC_ROTATE_LEFTSIZE(x, n) ISC_ROTATE_LEFT32(x, n) -#define ISC_ROTATE_RIGHTSIZE(x, n) ISC_ROTATE_RIGHT32(x, n) +#define ISC_ROTATE_LEFTSIZE(x, n) ISC_ROTATE_LEFT32((uint32_t)x, n) +#define ISC_ROTATE_RIGHTSIZE(x, n) ISC_ROTATE_RIGHT32((uint32_t)x, n) #else #error "size_t must be either 32 or 64-bits" #endif