Fix compile-time errors when NO_WERROR and WITHOUT_INET6_SUPPORT
(NO_INET6) are specified. Approved by: glebius MFC after: 1 week
This commit is contained in:
parent
604bf9d37e
commit
17ff561352
@ -23,9 +23,9 @@ printhost(family, addr)
|
||||
if ((family == -1) || !*addr)
|
||||
PRINTF("any");
|
||||
else {
|
||||
#ifdef USE_INET6
|
||||
void *ptr = addr;
|
||||
|
||||
#ifdef USE_INET6
|
||||
PRINTF("%s", inet_ntop(family, ptr, ipbuf, sizeof(ipbuf)));
|
||||
#else
|
||||
ipa.s_addr = *addr;
|
||||
|
@ -25,9 +25,9 @@ printhostmask(family, addr, mask)
|
||||
if ((family == -1) || ((!addr || !*addr) && (!mask || !*mask)))
|
||||
PRINTF("any");
|
||||
else {
|
||||
#ifdef USE_INET6
|
||||
void *ptr = addr;
|
||||
|
||||
#ifdef USE_INET6
|
||||
PRINTF("%s", inet_ntop(family, ptr, ipbuf, sizeof(ipbuf)));
|
||||
#else
|
||||
ipa.s_addr = *addr;
|
||||
|
@ -178,7 +178,7 @@ snmpv1_parse(char **strings)
|
||||
if (ctx->fd >= 0) {
|
||||
ctx->sin.sin_family = AF_INET;
|
||||
ctx->sin.sin_port = htons(162);
|
||||
if (connect(ctx->fd, &ctx->sin,
|
||||
if (connect(ctx->fd, (struct sockaddr *)&ctx->sin,
|
||||
sizeof(ctx->sin)) != 0) {
|
||||
snmpv1_destroy(ctx);
|
||||
return NULL;
|
||||
|
@ -181,7 +181,7 @@ snmpv2_parse(char **strings)
|
||||
if (ctx->fd >= 0) {
|
||||
ctx->sin.sin_family = AF_INET;
|
||||
ctx->sin.sin_port = htons(162);
|
||||
if (connect(ctx->fd, &ctx->sin,
|
||||
if (connect(ctx->fd, (struct sockaddr *)&ctx->sin,
|
||||
sizeof(ctx->sin)) != 0) {
|
||||
snmpv2_destroy(ctx);
|
||||
return NULL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user