From 26f52a19c38c7a86d85bad6225290707030ab004 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9B=D0=B5=D0=BE=D0=BD=D0=B8=D0=B4=20=D0=AE=D1=80=D1=8C?= =?UTF-8?q?=D0=B5=D0=B2=20=28Leonid=20Yuriev=29?= Date: Mon, 22 Aug 2022 12:37:17 +0300 Subject: [PATCH] mdbx: add explicit error message for Buildroot's Microblaze toolchain maintainers. --- src/lck-posix.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/lck-posix.c b/src/lck-posix.c index a1a465f8..761fdadf 100644 --- a/src/lck-posix.c +++ b/src/lck-posix.c @@ -201,9 +201,12 @@ static int lck_op(const mdbx_filehandle_t fd, int cmd, const int lck, ((uint64_t)offset + (uint64_t)len)); for (;;) { struct flock lock_op; - STATIC_ASSERT(sizeof(off_t) <= sizeof(lock_op.l_start) && - sizeof(off_t) <= sizeof(lock_op.l_len) && - OFF_T_MAX == (off_t)OFF_T_MAX); + STATIC_ASSERT_MSG(sizeof(off_t) <= sizeof(lock_op.l_start) && + sizeof(off_t) <= sizeof(lock_op.l_len) && + OFF_T_MAX == (off_t)OFF_T_MAX, + "Support for large/64-bit-sized files is misconfigured " + "for the target system and/or toolchain. " + "Please fix it or at least disable it completely."); memset(&lock_op, 0, sizeof(lock_op)); lock_op.l_type = lck; lock_op.l_whence = SEEK_SET;