# HG changeset patch # User AngelCarpintero # Date 1252663362 0 # Node ID 1011e450be45806c3a9f1056852743c647de803f # Parent 647e63ddab4652bf0ca341d364d07de51243958f Update to allow compile with 2.6.31 diff -r 647e63ddab46 -r 1011e450be45 vloopback.c --- a/vloopback.c Wed Jul 08 10:07:31 2009 +0000 +++ b/vloopback.c Fri Sep 11 10:02:42 2009 +0000 @@ -156,6 +156,11 @@ * 17.05.09 (Peter Holik) * Patch to allow work with kernel 2.6.29 * + * 05.08.09 (Angel Carpintero) + * Allow to compile with kernel 2.6.30.* + * + * 11.09.09 (Angel Carpintero) + * Allow to compile with kernel 2.6.31 */ @@ -178,11 +183,17 @@ /* v4l_compat_ioctl32 */ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27) + #ifdef __KERNEL__ + #undef __KERNEL__ + #endif #include #endif #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,27) #define vd_private_data dev.driver_data + #ifndef __KERNEL__ + #define __KERNEL__ + #endif #else #define vd_private_data priv #endif @@ -191,6 +202,7 @@ #include #include + /* Include files which are unique to versions */ #if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0) #include @@ -430,6 +442,8 @@ } #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27) loops[nr]->pid = current->pid; +#elif LINUX_VERSION_CODE > KERNEL_VERSION(2,6,30) + loops[nr]->pid = find_pid_ns(current->pid,0); #else // TODO : Check in stable 2.6.27 loops[nr]->pid = task_pid(find_task_by_vpid(current->pid));