[openib-general] [PATCH] minor fix for 2.6.16 to not include mutex-backport.h
Ralph Campbell
ralphc at pathscale.com
Tue Mar 7 18:11:11 PST 2006
I was trying out building the OpenIB code on SLES 10 with the
vmlinuz-2.6.16-rc5-git2-2-smp kernel and ran into a minor compile
error with mutex-backport.h being included instead of mutex.h.
Here is a patch of the changes I made which work for me.
Also, I noticed that in sdp_inet.c, sdp_inet_ioctl() calls
dev_ioctl() which is no longer exported in 2.6.16.
(it's defined in net/core/dev.c).
I'm not sure what the right fix is so I haven't included a patch.
Signed-off-by: Ralph Campbell <ralphc at pathscale.com>
Index: openib/src/linux-kernel/infiniband/core/cma.c
===================================================================
--- openib/src/linux-kernel/infiniband/core/cma.c (revision 5660)
+++ openib/src/linux-kernel/infiniband/core/cma.c (working copy)
@@ -33,6 +33,8 @@
#include <linux/version.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16)
#include <linux/mutex-backport.h>
+#else
+#include <linux/mutex.h>
#endif /* XXX end of hack */
#include <linux/in.h>
Index: openib/src/linux-kernel/infiniband/core/ucma.c
===================================================================
--- openib/src/linux-kernel/infiniband/core/ucma.c (revision 5660)
+++ openib/src/linux-kernel/infiniband/core/ucma.c (working copy)
@@ -34,6 +34,8 @@
#include <linux/version.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16)
#include <linux/mutex-backport.h>
+#else
+#include <linux/mutex.h>
#endif /* XXX end of hack */
#include <linux/poll.h>
Index: openib/src/linux-kernel/infiniband/core/local_sa.c
===================================================================
--- openib/src/linux-kernel/infiniband/core/local_sa.c (revision 5660)
+++ openib/src/linux-kernel/infiniband/core/local_sa.c (working copy)
@@ -35,7 +35,12 @@
#include <linux/interrupt.h>
#include <linux/index.h>
/* XXX : fixme when 2.6.16 released */
+#include <linux/version.h>
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16)
#include <linux/mutex-backport.h>
+#else
+#include <linux/mutex.h>
+#endif
#include <linux/pci.h>
#include <rdma/ib_addr.h>
--
Ralph Campbell <ralphc at pathscale.com>
More information about the general
mailing list