From: Ondřej Surý Date: Thu, 18 Apr 2019 09:49:10 +0000 (+0200) Subject: On non-GNUC systems, use uintmax_t in the ISC_ALIGN macro X-Git-Tag: v9.15.0~40^2 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=2e40cc94dc5ed7753c7e8a3ff128d60dbb4e3e2b;p=thirdparty%2Fbind9.git On non-GNUC systems, use uintmax_t in the ISC_ALIGN macro --- diff --git a/lib/isc/include/isc/util.h b/lib/isc/include/isc/util.h index b16b024e74c..53b31f1f74f 100644 --- a/lib/isc/include/isc/util.h +++ b/lib/isc/include/isc/util.h @@ -12,6 +12,8 @@ #ifndef ISC_UTIL_H #define ISC_UTIL_H 1 +#include + /*! \file isc/util.h * NOTE: * @@ -264,7 +266,11 @@ extern void mock_assert(const int result, const char* const expression, /*% * Alignment */ -#define ISC_ALIGN(x, a) (((x) + (a) - 1) & ~((typeof(x))(a)-1)) +#ifdef __GNUC__ +#define ISC_ALIGN(x, a) (((x) + (a) - 1) & ~((typeof(x))(a) - 1)) +#else +#define ISC_ALIGN(x, a) (((x) + (a) - 1) & ~((uintmax_t)(a) - 1)) +#endif /*% * Misc