diff -ru orig/iscsitarget-0.4.12/kernel/config.c iscsitarget-0.4.12/kernel/config.c --- orig/iscsitarget-0.4.12/kernel/config.c 2005-09-12 06:03:38.000000000 -0400 +++ iscsitarget-0.4.12/kernel/config.c 2005-09-16 12:05:31.000000000 -0400 @@ -5,7 +5,7 @@ */ #include - +#include #include "iscsi.h" #include "iscsi_dbg.h" @@ -216,10 +216,18 @@ return err; } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,11) static long ioctl(struct file *file, unsigned int cmd, unsigned long arg) +#else +static int ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) +#endif { struct iscsi_target *target = NULL; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,11) long err; +#else + int err; +#endif u32 id; if ((err = get_user(id, (u32 *) arg)) != 0) @@ -309,5 +317,9 @@ struct file_operations ctr_fops = { .owner = THIS_MODULE, - .unlocked_ioctl = ioctl, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,11) + .unlocked_ioctl = ioctl, +#else + .ioctl = ioctl, +#endif }; diff -ru orig/iscsitarget-0.4.12/kernel/event.c iscsitarget-0.4.12/kernel/event.c --- orig/iscsitarget-0.4.12/kernel/event.c 2005-09-12 06:03:38.000000000 -0400 +++ iscsitarget-0.4.12/kernel/event.c 2005-09-14 16:53:24.000000000 -0400 @@ -7,6 +7,8 @@ */ #include +#include + #include "iet_u.h" #include "iscsi_dbg.h" @@ -70,9 +72,11 @@ if (!(skb = alloc_skb(NLMSG_SPACE(len), gfp_mask))) return -ENOMEM; - +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,11) nlh = __nlmsg_put(skb, ietd_pid, seq++, NLMSG_DONE, len - sizeof(*nlh), 0); - +#else + nlh = __nlmsg_put(skb, ietd_pid, seq++, NLMSG_DONE, len - sizeof(*nlh)); +#endif memcpy(NLMSG_DATA(nlh), data, len); return netlink_unicast(nl, skb, ietd_pid, 0);