Software /
code /
prosody
Changeset
5052:f1157cce5d7a
util.pposix: Warn about posix_fallocate
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 29 Jul 2012 22:21:58 +0200 |
parents | 5051:71253db26fda |
children | 5053:375ab71e4b37 |
files | util-src/pposix.c |
diffstat | 1 files changed, 1 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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 {