trunk

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 71253db26fda
children 375ab71e4b37
files util-src/pposix.c
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line diff
     1.1 --- a/util-src/pposix.c	Sun Jul 29 03:30:59 2012 +0200
     1.2 +++ b/util-src/pposix.c	Sun Jul 29 22:21:58 2012 +0200
     1.3 @@ -664,6 +664,7 @@
     1.4  #if defined(_GNU_SOURCE)
     1.5  	if(fallocate(fileno(f), FALLOC_FL_KEEP_SIZE, offset, len) != 0)
     1.6  #elif _XOPEN_SOURCE >= 600 || _POSIX_C_SOURCE >= 200112L
     1.7 +#warning Using posix_fallocate() fallback. Linux fallocate() is strongly recommended if available: recompile with -D_GNU_SOURCE
     1.8  	if(posix_fallocate(fileno(f), offset, len) != 0)
     1.9  #endif
    1.10  	{