mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-28 04:21:50 -06:00
Probe for fdatasync()
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
cdd0935cbd
commit
5f6b9e8fd5
2 changed files with 17 additions and 1 deletions
16
configure
vendored
16
configure
vendored
|
@ -1625,6 +1625,18 @@ if compile_prog "" "" ; then
|
||||||
need_offsetof=no
|
need_offsetof=no
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
##########################################
|
||||||
|
# check if we have fdatasync
|
||||||
|
|
||||||
|
fdatasync=no
|
||||||
|
cat > $TMPC << EOF
|
||||||
|
#include <unistd.h>
|
||||||
|
int main(void) { return fdatasync(0); }
|
||||||
|
EOF
|
||||||
|
if compile_prog "" "" ; then
|
||||||
|
fdatasync=yes
|
||||||
|
fi
|
||||||
|
|
||||||
# End of CC checks
|
# End of CC checks
|
||||||
# After here, no more $cc or $ld runs
|
# After here, no more $cc or $ld runs
|
||||||
|
|
||||||
|
@ -1738,6 +1750,7 @@ echo "Install blobs $blobs"
|
||||||
echo "KVM support $kvm"
|
echo "KVM support $kvm"
|
||||||
echo "fdt support $fdt"
|
echo "fdt support $fdt"
|
||||||
echo "preadv support $preadv"
|
echo "preadv support $preadv"
|
||||||
|
echo "fdatasync $fdatasync"
|
||||||
|
|
||||||
if test $sdl_too_old = "yes"; then
|
if test $sdl_too_old = "yes"; then
|
||||||
echo "-> Your SDL version is too old - please upgrade to have SDL support"
|
echo "-> Your SDL version is too old - please upgrade to have SDL support"
|
||||||
|
@ -1928,6 +1941,9 @@ fi
|
||||||
if test "$need_offsetof" = "yes" ; then
|
if test "$need_offsetof" = "yes" ; then
|
||||||
echo "CONFIG_NEED_OFFSETOF=y" >> $config_host_mak
|
echo "CONFIG_NEED_OFFSETOF=y" >> $config_host_mak
|
||||||
fi
|
fi
|
||||||
|
if test "$fdatasync" = "yes" ; then
|
||||||
|
echo "CONFIG_FDATASYNC=y" >> $config_host_mak
|
||||||
|
fi
|
||||||
|
|
||||||
# XXX: suppress that
|
# XXX: suppress that
|
||||||
if [ "$bsd" = "yes" ] ; then
|
if [ "$bsd" = "yes" ] ; then
|
||||||
|
|
2
cutils.c
2
cutils.c
|
@ -124,7 +124,7 @@ int qemu_fls(int i)
|
||||||
*/
|
*/
|
||||||
int qemu_fdatasync(int fd)
|
int qemu_fdatasync(int fd)
|
||||||
{
|
{
|
||||||
#ifdef _POSIX_SYNCHRONIZED_IO
|
#ifdef CONFIG_FDATASYNC
|
||||||
return fdatasync(fd);
|
return fdatasync(fd);
|
||||||
#else
|
#else
|
||||||
return fsync(fd);
|
return fsync(fd);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue