From: Patrick G. Bridges Date: Thu, 6 Oct 2011 20:34:06 +0000 (-0600) Subject: Fix compile error in keyed stream for newer linux kernels X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=commitdiff_plain;h=1943835daca938e18862fd97fe80ad1a062a617c Fix compile error in keyed stream for newer linux kernels --- diff --git a/linux_module/iface-keyed-stream.c b/linux_module/iface-keyed-stream.c index fc0e1b9..bb19e70 100644 --- a/linux_module/iface-keyed-stream.c +++ b/linux_module/iface-keyed-stream.c @@ -876,7 +876,6 @@ static unsigned int keyed_stream_poll_user(struct file *filp, poll_table *wait) return 0; } - static int keyed_stream_ioctl_user(struct inode *inode, struct file *filp, unsigned int ioctl, unsigned long arg) { void __user *argp = (void __user *)arg; @@ -986,6 +985,11 @@ static int keyed_stream_ioctl_user(struct inode *inode, struct file *filp, unsig } } +static long keyed_stream_compat_ioctl_user(struct file * filp, unsigned int ioctl, unsigned long arg) +{ + return keyed_stream_ioctl_user(NULL, filp, ioctl, arg); +} + static int keyed_stream_release_user(struct inode *inode, struct file *filp) { struct user_keyed_stream *s = filp->private_data; @@ -1007,7 +1011,11 @@ static int keyed_stream_release_user(struct inode *inode, struct file *filp) static struct file_operations user_keyed_stream_fops = { .poll = keyed_stream_poll_user, +#ifdef HAVE_COMPAT_IOCTL + .compat_ioctl = keyed_stream_compat_ioctl_user, +#else .ioctl = keyed_stream_ioctl_user, +#endif .release = keyed_stream_release_user, };