diff options
author | Ulrich Hecht <uli@suse.de> | 2009-09-17 20:22:14 +0300 |
---|---|---|
committer | Riku Voipio <riku.voipio@iki.fi> | 2009-10-15 23:55:55 +0300 |
commit | d092793872848b83dfb8973640ce71dc2522a8f3 (patch) | |
tree | a32a3ec5321c36e688064a5fec58b3b1b36ec219 /configure | |
parent | 5041fccd8ebed677f4d3012011657f8cc2340ea4 (diff) |
implementations of dup3 and fallocate that are good enough to fool LTP
updated fallocate check to new configure, added dup3 check as suggested
by Jan-Simon Möller.
Riku: updated to apply to current git.
Signed-off-by: Ulrich Hecht <uli@suse.de>
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 36 |
1 files changed, 36 insertions, 0 deletions
@@ -1569,6 +1569,36 @@ if compile_prog "" "" ; then eventfd=yes fi +# check for fallocate +fallocate=no +cat > $TMPC << EOF +#include <fcntl.h> + +int main(void) +{ + fallocate(0, 0, 0, 0); + return 0; +} +EOF +if $cc $ARCH_CFLAGS -o $TMPE $TMPC 2> /dev/null ; then + fallocate=yes +fi + +# check for dup3 +dup3=no +cat > $TMPC << EOF +#include <unistd.h> + +int main(void) +{ + dup3(0, 0, 0); + return 0; +} +EOF +if $cc $ARCH_CFLAGS -o $TMPE $TMPC 2> /dev/null ; then + dup3=yes +fi + # Check if tools are available to build documentation. if test "$docs" != "no" ; then if test -x "`which texi2html 2>/dev/null`" -a \ @@ -1950,6 +1980,12 @@ fi if test "$eventfd" = "yes" ; then echo "CONFIG_EVENTFD=y" >> $config_host_mak fi +if test "$fallocate" = "yes" ; then + echo "CONFIG_FALLOCATE=y" >> $config_host_mak +fi +if test "$dup3" = "yes" ; then + echo "CONFIG_DUP3=y" >> $config_host_mak +fi if test "$inotify" = "yes" ; then echo "CONFIG_INOTIFY=y" >> $config_host_mak fi |