From: Patrick G. Bridges Date: Tue, 17 Jan 2012 21:26:30 +0000 (-0700) Subject: Fixed compile error in host device for newer linux kernels X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=commitdiff_plain;h=59a2f6308c5077481e184c4cb5792c082cf2ca3a;p=palacios.git Fixed compile error in host device for newer linux kernels --- diff --git a/linux_module/iface-host-dev.c b/linux_module/iface-host-dev.c index 191e57e..c7c2567 100644 --- a/linux_module/iface-host-dev.c +++ b/linux_module/iface-host-dev.c @@ -342,7 +342,6 @@ static int host_dev_release(struct inode * i, struct file * filp) return 0; } - static int host_dev_ioctl(struct inode *ip, struct file *fp, unsigned int val, unsigned long arg) { void __user *argp = (void __user *)arg; @@ -596,13 +595,19 @@ static int host_dev_ioctl(struct inode *ip, struct file *fp, unsigned int val, u } - - +static long host_dev_compat_ioctl(struct file * filp, unsigned int ioctl, unsigned long arg) +{ + return host_dev_ioctl(NULL, filp, ioctl, arg); +} static struct file_operations host_dev_fops = { .poll = host_dev_poll, .release = host_dev_release, - .ioctl = host_dev_ioctl, +#ifdef HAVE_COMPAT_IOCTL + .compat_ioctl = host_dev_compat_ioctl, +#else + .ioctl = host_dev_ioctl, +#endif };