Hi,

When I build open-iscsi on CentOS 5.4, I get the following errors:

In file included from
/home1/erez.zilber/work/open-source/open-iscsi/kernel/scsi_transport_iscsi.h:30,
                 from
/home1/erez.zilber/work/open-source/open-iscsi/kernel/scsi_transport_iscsi.c:30:
/home1/erez.zilber/work/open-source/open-iscsi/kernel/open_iscsi_compat.h:154:
error: static declaration of ‘kernel_getsockname’ follows non-static
declaration
include/linux/net.h:221: error: previous declaration of
‘kernel_getsockname’ was here
/home1/erez.zilber/work/open-source/open-iscsi/kernel/open_iscsi_compat.h:160:
error: static declaration of ‘kernel_getpeername’ follows non-static
declaration
include/linux/net.h:223: error: previous declaration of
‘kernel_getpeername’ was here

This is probably because of the following code in 2.6.14-23_compat.patch:

+#ifdef RHEL_RELEASE_CODE
+#if (RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(5, 4))
+#define RHELC1 1
+#endif
+#endif

and

+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)) \
+       && !(defined RHELC1)
+static inline int kernel_getsockname(struct socket *sock, struct
sockaddr *addr,
+                       int *addrlen)
+{
+       return sock->ops->getname(sock, addr, addrlen, 0);
+}
+
+static inline int kernel_getpeername(struct socket *sock, struct
sockaddr *addr,
+                       int *addrlen)
+{
+       return sock->ops->getname(sock, addr, addrlen, 1);
+}
+#endif

What does RHELC1 mean? What does it have to do with versions older than 5.4?

Thanks,
Erez

-- 
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To post to this group, send email to open-is...@googlegroups.com.
To unsubscribe from this group, send email to 
open-iscsi+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/open-iscsi?hl=en.

Reply via email to