configure: test if fdatasync(2) is available for internal proplib.

This commit is contained in:
Juan RP 2013-06-19 11:41:49 +02:00
parent 4ef66d99bb
commit 8f6d400cdd

20
configure vendored
View File

@ -448,6 +448,26 @@ else
fi
rm -f _$func.c _$func
#
# Check for fdatasync().
#
func=fdatasync
printf "Checking for $func() ... "
cat <<EOF > _$func.c
#include <unistd.h>
int main(void) {
fdatasync(0);
return 0;
}
EOF
if $XCC _$func.c -o _$func 2>/dev/null; then
echo yes.
echo "CPPFLAGS += -DHAVE_FDATASYNC" >>$CONFIG_MK
else
echo no.
fi
rm -f _$func.c _$func
#
# Check for libfetch's fetchIO_read().
#