Software /
code /
prosody
Comparison
util-src/pposix.c @ 5068:14d4fc5859b9
util.pposix: Put the warning back, mention how we might still use posix_fallocate()
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 31 Jul 2012 23:43:34 +0200 |
parent | 5067:7db1056c63a9 |
child | 5176:7d0a8b255a37 |
comparison
equal
deleted
inserted
replaced
5067:7db1056c63a9 | 5068:14d4fc5859b9 |
---|---|
672 { | 672 { |
673 lua_pushnil(L); | 673 lua_pushnil(L); |
674 lua_pushstring(L, strerror(errno)); | 674 lua_pushstring(L, strerror(errno)); |
675 return 2; | 675 return 2; |
676 } | 676 } |
677 #else | |
678 #warning Only using posix_fallocate() fallback. | |
679 #warning Linux fallocate() is strongly recommended if available: recompile with -D_GNU_SOURCE | |
680 #warning Note that posix_fallocate() will still be used on filesystems that dont support fallocate() | |
677 #endif | 681 #endif |
678 | 682 |
679 if(posix_fallocate(fileno(f), offset, len) == 0) | 683 if(posix_fallocate(fileno(f), offset, len) == 0) |
680 { | 684 { |
681 lua_pushboolean(L, 1); | 685 lua_pushboolean(L, 1); |