# HG changeset patch # User Kim Alvefur # Date 1343593318 -7200 # Node ID f1157cce5d7a06530329d3a8062ab271c6c93080 # Parent 71253db26fda9ee5573cb184b91b0726c97a0577 util.pposix: Warn about posix_fallocate diff -r 71253db26fda -r f1157cce5d7a util-src/pposix.c --- a/util-src/pposix.c Sun Jul 29 03:30:59 2012 +0200 +++ b/util-src/pposix.c Sun Jul 29 22:21:58 2012 +0200 @@ -664,6 +664,7 @@ #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 {