- 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
This commit is contained in:
Jeff Roberson 2013-08-09 03:29:46 +00:00
parent 863c7e4562
commit 9681a74932
4 changed files with 14 additions and 7 deletions

View File

@ -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 */

View File

@ -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] : "???")

View File

@ -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[];

View File

@ -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, const char *fmt, ...)
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);
}