From: Denys Vlasenko Date: Thu, 17 Nov 2011 20:51:32 +0000 (+0100) Subject: libbb.h: add check for bad off_t size detection X-Git-Tag: 1_20_0~143^2~6 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=1dc80bae0b4c339553b8ee9fd8309c13f8c1f1d8;p=oweals%2Fbusybox.git libbb.h: add check for bad off_t size detection Signed-off-by: Denys Vlasenko --- diff --git a/include/libbb.h b/include/libbb.h index 796351865..3f6fe47ed 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -245,6 +245,12 @@ typedef unsigned long uoff_t; #endif /* scary. better ideas? (but do *test* them first!) */ #define OFF_T_MAX ((off_t)~((off_t)1 << (sizeof(off_t)*8-1))) +/* Users report bionic to use 32-bit off_t even if LARGEFILE support is requested. + * We misdetected that. Don't let it build: + */ +struct BUG_off_t_size_is_misdetected { + char BUG_off_t_size_is_misdetected[sizeof(off_t) == sizeof(uoff_t) ? 1 : -1]; +}; /* Some useful definitions */ #undef FALSE