Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 Aug 2013 03:29:46 +0000 (UTC)
From:      Jeff Roberson <jeff@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r254123 - in head/contrib/ofed: libsdp/src/linux management/infiniband-diags/src management/opensm/opensm
Message-ID:  <201308090329.r793TkOY007132@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jeff
Date: Fri Aug  9 03:29:46 2013
New Revision: 254123
URL: http://svnweb.freebsd.org/changeset/base/254123

Log:
   - Fix compile errors from the clang conversion
   - Grab AF_SDP_INET from sys/socket.h
  
  Submitted by:	Garrett Cooper
  Sponsored by:	EMC / Isilon Storage Division

Modified:
  head/contrib/ofed/libsdp/src/linux/sdp_inet.h
  head/contrib/ofed/management/infiniband-diags/src/sminfo.c
  head/contrib/ofed/management/opensm/opensm/osm_console.c
  head/contrib/ofed/management/opensm/opensm/osm_subnet.c

Modified: head/contrib/ofed/libsdp/src/linux/sdp_inet.h
==============================================================================
--- head/contrib/ofed/libsdp/src/linux/sdp_inet.h	Fri Aug  9 03:26:17 2013	(r254122)
+++ head/contrib/ofed/libsdp/src/linux/sdp_inet.h	Fri Aug  9 03:29:46 2013	(r254123)
@@ -29,8 +29,12 @@
  */
 
 #ifndef SOLARIS_BUILD
+#ifdef __FreeBSD__
+#include <sys/socket.h>
+#else
 #define AF_INET_SDP 27			  /* SDP socket protocol family */
 #define AF_INET6_SDP 28                   /* SDP socket protocol family */
+#endif
 #else
 #define AF_INET_SDP 31  /* This is an invalid family on native solaris
                          * and will only work using QuickTransit */

Modified: head/contrib/ofed/management/infiniband-diags/src/sminfo.c
==============================================================================
--- head/contrib/ofed/management/infiniband-diags/src/sminfo.c	Fri Aug  9 03:26:17 2013	(r254122)
+++ head/contrib/ofed/management/infiniband-diags/src/sminfo.c	Fri Aug  9 03:29:46 2013	(r254123)
@@ -72,10 +72,10 @@ enum {
 };
 
 char *statestr[] = {
-	[SMINFO_NOTACT] "SMINFO_NOTACT",
-	[SMINFO_DISCOVER] "SMINFO_DISCOVER",
-	[SMINFO_STANDBY] "SMINFO_STANDBY",
-	[SMINFO_MASTER] "SMINFO_MASTER",
+	[SMINFO_NOTACT] = "SMINFO_NOTACT",
+	[SMINFO_DISCOVER] = "SMINFO_DISCOVER",
+	[SMINFO_STANDBY] = "SMINFO_STANDBY",
+	[SMINFO_MASTER] = "SMINFO_MASTER",
 };
 
 #define STATESTR(s)	(((unsigned)(s)) < SMINFO_STATE_LAST ? statestr[s] : "???")

Modified: head/contrib/ofed/management/opensm/opensm/osm_console.c
==============================================================================
--- head/contrib/ofed/management/opensm/opensm/osm_console.c	Fri Aug  9 03:26:17 2013	(r254122)
+++ head/contrib/ofed/management/opensm/opensm/osm_console.c	Fri Aug  9 03:29:46 2013	(r254123)
@@ -67,7 +67,10 @@ static struct {
 	time_t previous;
 	void (*loop_function) (osm_opensm_t * p_osm, FILE * out);
 } loop_command = {
-on: 0, delay_s: 2, loop_function:NULL};
+	.on = 0,
+	.delay_s = 2,
+	.loop_function = NULL,
+};
 
 static const struct command console_cmds[];
 

Modified: head/contrib/ofed/management/opensm/opensm/osm_subnet.c
==============================================================================
--- head/contrib/ofed/management/opensm/opensm/osm_subnet.c	Fri Aug  9 03:26:17 2013	(r254122)
+++ head/contrib/ofed/management/opensm/opensm/osm_subnet.c	Fri Aug  9 03:29:46 2013	(r254123)
@@ -482,7 +482,7 @@ static void log_report(const char *fmt, 
 	va_start(args, fmt);
 	vsnprintf(buf, sizeof(buf), fmt, args);
 	va_end(args);
-	printf(buf);
+	printf("%s", buf);
 	cl_log_event("OpenSM", CL_LOG_INFO, buf, NULL, 0);
 }
 
@@ -500,7 +500,7 @@ static void log_config_value(char *name,
 		n = sizeof(buf);
 	snprintf(buf + n, sizeof(buf) - n, "\n");
 	va_end(args);
-	printf(buf);
+	printf("%s", buf);
 	cl_log_event("OpenSM", CL_LOG_INFO, buf, NULL, 0);
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201308090329.r793TkOY007132>