From 8578efc0b92626d53535ff04d146b050a50a61da Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 29 Jul 2012 22:21:58 +0200 Subject: util.pposix: Warn about posix_fallocate --- util-src/pposix.c | 1 + 1 file changed, 1 insertion(+) diff --git a/util-src/pposix.c b/util-src/pposix.c index 7600766f..7dd8708b 100644 --- a/util-src/pposix.c +++ b/util-src/pposix.c @@ -664,6 +664,7 @@ int lc_fallocate(lua_State* L) #if defined(_GNU_SOURCE) if(fallocate(fileno(f), FALLOC_FL_KEEP_SIZE, offset, len) != 0) #elif _XOPEN_SOURCE >= 600 || _POSIX_C_SOURCE >= 200112L +#warning Using posix_fallocate() fallback. Linux fallocate() is strongly recommended if available: recompile with -D_GNU_SOURCE if(posix_fallocate(fileno(f), offset, len) != 0) #endif { -- cgit v1.2.3