Fix IRIX build. sa_family collides with a #define in sys/socket.h on IRIX.

This commit is contained in:
Kevin Bowling 2010-11-22 16:40:31 -07:00
parent 568ac4fd1b
commit e87498231c

View File

@ -206,7 +206,7 @@ regress_ipv6_parse(void *ptr)
static struct sa_port_ent { static struct sa_port_ent {
const char *parse; const char *parse;
int sa_family; int safamily;
const char *addr; const char *addr;
int port; int port;
} sa_port_ents[] = { } sa_port_ents[] = {
@ -235,14 +235,14 @@ regress_sockaddr_port_parse(void *ptr)
memset(&ss, 0, sizeof(ss)); memset(&ss, 0, sizeof(ss));
r = evutil_parse_sockaddr_port(ent->parse, (struct sockaddr*)&ss, &len); r = evutil_parse_sockaddr_port(ent->parse, (struct sockaddr*)&ss, &len);
if (r < 0) { if (r < 0) {
if (ent->sa_family) if (ent->safamily)
TT_FAIL(("Couldn't parse %s!", ent->parse)); TT_FAIL(("Couldn't parse %s!", ent->parse));
continue; continue;
} else if (! ent->sa_family) { } else if (! ent->safamily) {
TT_FAIL(("Shouldn't have been able to parse %s!", ent->parse)); TT_FAIL(("Shouldn't have been able to parse %s!", ent->parse));
continue; continue;
} }
if (ent->sa_family == AF_INET) { if (ent->safamily == AF_INET) {
struct sockaddr_in sin; struct sockaddr_in sin;
memset(&sin, 0, sizeof(sin)); memset(&sin, 0, sizeof(sin));
#ifdef _EVENT_HAVE_STRUCT_SOCKADDR_IN_SIN_LEN #ifdef _EVENT_HAVE_STRUCT_SOCKADDR_IN_SIN_LEN