OSDN Git Service

libext2fs: check for fallocate symbol before using it
authorMike Frysinger <vapier@gentoo.org>
Wed, 7 Mar 2012 01:21:36 +0000 (20:21 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 7 Mar 2012 01:21:39 +0000 (20:21 -0500)
commit800766ee4a2bcdc0a32442d093d20da6ea3815ab
tree969fa938337b229c9ab8fd753613fc9577327807
parent677fc9169c2802f74ec15e16041baba01fec8335
libext2fs: check for fallocate symbol before using it

If we have newer kernel headers which define FALLOC_FL_PUNCH_HOLE, but we
are on an older glibc which lacks fallocate, we end up trying to use the
func anyways.  Check the ifdef that autoconf already set up for us.

Reported-by: Ortwin Glueck <odi@odi.ch>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
lib/ext2fs/unix_io.c