mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
linux-user: Add configure check for linux/fiemap.h and IOC_FS_FIEMAP
Add a configure check for the existence of linux/fiemap.h and the IOC_FS_FIEMAP ioctl. This fixes a compilation failure on Linux systems which don't have that header file. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
This commit is contained in:
parent
0322b26e2d
commit
dace20dcc9
3 changed files with 25 additions and 1 deletions
20
configure
vendored
20
configure
vendored
|
@ -2090,6 +2090,23 @@ if compile_prog "$ARCH_CFLAGS" "" ; then
|
|||
sync_file_range=yes
|
||||
fi
|
||||
|
||||
# check for linux/fiemap.h and FS_IOC_FIEMAP
|
||||
fiemap=no
|
||||
cat > $TMPC << EOF
|
||||
#include <sys/ioctl.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/fiemap.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
ioctl(0, FS_IOC_FIEMAP, 0);
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
if compile_prog "$ARCH_CFLAGS" "" ; then
|
||||
fiemap=yes
|
||||
fi
|
||||
|
||||
# check for dup3
|
||||
dup3=no
|
||||
cat > $TMPC << EOF
|
||||
|
@ -2631,6 +2648,9 @@ fi
|
|||
if test "$sync_file_range" = "yes" ; then
|
||||
echo "CONFIG_SYNC_FILE_RANGE=y" >> $config_host_mak
|
||||
fi
|
||||
if test "$fiemap" = "yes" ; then
|
||||
echo "CONFIG_FIEMAP=y" >> $config_host_mak
|
||||
fi
|
||||
if test "$dup3" = "yes" ; then
|
||||
echo "CONFIG_DUP3=y" >> $config_host_mak
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue