[ofw] [PATCH] allow svr 2003 compilation

Uri Habusha urih at mellanox.co.il
Tue Jun 28 11:24:53 PDT 2011


Hi Stan,

I think we agreed to stop to support win 2003. Am I wrong?

-----Original Message-----
From: ofw-bounces at lists.openfabrics.org [mailto:ofw-bounces at lists.openfabrics.org] On Behalf Of Smith, Stan
Sent: Tuesday, June 28, 2011 9:21 PM
To: Alex Naslednikov
Cc: ofw at lists.openfabrics.org
Subject: [ofw] [PATCH] allow svr 2003 compilation

Hello Alex,
  Your patch did not compile for svr 2003 x86; I believe I captured in spirit what you wanted.

Signed-off-by: stan smith <stan.smith at intel.com>

--- C:/Users/scsmith/AppData/Local/Temp/al_dm.c-revBASE.svn000.tmp.c	Tue Jun 28 11:12:33 2011
+++ C:/Users/scsmith/Documents/openIB-windows/SVN/gen1/trunk/core/al/al_dm.c	Tue Jun 28 11:13:03 2011
@@ -765,17 +765,25 @@
 
 		reg_svc_req.svc_rec.service_lease = 0xffffffff;  #ifdef CL_KERNEL
-	RtlStringCchCopyA(
-		(char*)reg_svc_req.svc_rec.service_name,
-		sizeof(reg_svc_req.svc_rec.service_name),
-		DM_SVC_NAME
-		);	
+		RtlStringCchCopyA(
+			(char*)reg_svc_req.svc_rec.service_name,
+			sizeof(reg_svc_req.svc_rec.service_name),
+			DM_SVC_NAME
+			);	
 #else
+#ifdef NTDDI_WIN8
 		strcpy_s(
 			(char*)reg_svc_req.svc_rec.service_name,
 			sizeof(reg_svc_req.svc_rec.service_name),
 			DM_SVC_NAME
 			);
+#else
+		strncpy(
+			(char*)reg_svc_req.svc_rec.service_name,
+			DM_SVC_NAME,
+			sizeof(DM_SVC_NAME)
+			);
+#endif
 #endif		
 		reg_svc_req.svc_rec.service_gid = p_iou_port->port_gid;
 		reg_svc_req.port_guid = p_iou_port->port_guid;





More information about the ofw mailing list