From dace20dcc98f90a931e88aa641f5633cdcf30c30 Mon Sep 17 00:00:00 2001 From: Peter Maydell Date: Mon, 10 Jan 2011 13:11:24 +0000 Subject: 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 Signed-off-by: Aurelien Jarno --- linux-user/syscall.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'linux-user/syscall.c') diff --git a/linux-user/syscall.c b/linux-user/syscall.c index f10e17ae23..499c4d7d62 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -83,7 +83,9 @@ int __clone2(int (*fn)(void *), void *child_stack_base, #include #include #include +#if defined(CONFIG_FIEMAP) #include +#endif #include #include #include "linux_loop.h" @@ -2986,6 +2988,7 @@ struct IOCTLEntry { #define MAX_STRUCT_SIZE 4096 +#ifdef CONFIG_FIEMAP /* So fiemap access checks don't overflow on 32 bit systems. * This is very slightly smaller than the limit imposed by * the underlying kernel. @@ -3072,6 +3075,7 @@ static abi_long do_ioctl_fs_ioc_fiemap(const IOCTLEntry *ie, uint8_t *buf_temp, } return ret; } +#endif static IOCTLEntry ioctl_entries[] = { #define IOCTL(cmd, access, ...) \ -- cgit v1.2.3-55-g7522