2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-09-05 00:55:24 +00:00

Align CMSG buffers to a void* boundary, fixes crash on architectures with strict alignment

CHANGES entry
This commit is contained in:
Witold Kręcicki
2018-09-07 09:34:32 +02:00
parent a985badd34
commit 17212cf996
3 changed files with 11 additions and 2 deletions

View File

@@ -259,6 +259,11 @@ extern void mock_assert(const int result, const char* const expression,
*/
#define TIME_NOW(tp) RUNTIME_CHECK(isc_time_now((tp)) == ISC_R_SUCCESS)
/*%
* Alignment
*/
#define ALIGN(x, a) (((x) + (a) - 1) & ~((typeof(x))(a)-1))
/*%
* Misc
*/