[ofa-general] asm/byteorder.h needed in infiniband/cm.h

Jon Mason jon at opengridcomputing.com
Sun Sep 21 15:45:19 PDT 2008


While building the current ompi-trunk on top of OFED-1.4, I hit the following
build break:

connect/btl_openib_connect_ibcm.c: In function `ibcm_component_query':
connect/btl_openib_connect_ibcm.c:766: error: implicit declaration of function `__constant_cpu_to_be64'
make[2]: *** [connect/btl_openib_connect_ibcm.lo] Error 1

The line in question is referring to IB_CM_ASSIGN_SERVICE_ID in infiniband/cm.h.
That file does not include a reference to where __constant_cpu_to_be64 is
defined.  When I included asm/byteorder.h, everything built fine and all iWARP
tests passed on OMPI trunk.

Below is the patch in question.

Thanks,
Jon

Signed-Off-By: Jon Mason <jon at opengridcomputing.com>

--- /usr/include/infiniband/cm.h.orig	2008-09-21 15:36:46.000000000 -0700
+++ /usr/include/infiniband/cm.h	2008-09-21 14:17:43.000000000 -0700
@@ -38,6 +38,7 @@
 
 #include <infiniband/verbs.h>
 #include <infiniband/sa.h>
+#include <asm/byteorder.h>
 
 #ifdef __cplusplus
 extern "C" {



More information about the general mailing list