[ofw] svn.2066 - trunk/hw/mlx4/kernel/hca/wmi.c fails to build

Smith, Stan stan.smith at intel.com
Mon Mar 30 17:19:50 PDT 2009


Hello Leo,
  When attempting to build svn.2066 I encountered the following mlx4 build error.

Duplicate definition for 'offsetof' error.

I found an example of this style of fix in the core\al folder and applied it to 'wmi.c'.
Mlx4 driver now builds.

Perhaps we should consider using the MS definition for 'offsetof' instead of our own?

diff U3 trunk/hw/mlx4/kernel/hca/wmi.c trunk/hw/mlx4/kernel/hca/wmi.c.fixed
--- trunk/hw/mlx4/kernel/hca/wmi.c      Thu Mar 12 09:57:57 2009
+++ trunk/hw/mlx4/kernel/hca/wmi.c.fixed        Mon Mar 30 17:10:33 2009
@@ -39,6 +39,9 @@
 #else

 #if defined(EVENT_TRACING)
+#ifdef offsetof
+#undef offsetof
+#endif
 #include "wmi.tmh"
 #endif

Stan.



More information about the ofw mailing list