Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 5 Jul 2014 07:15:19 +0000 (UTC)
From:      Cy Schubert <cy@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r268286 - head/contrib/ipfilter/lib
Message-ID:  <201407050715.s657FJEJ073575@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cy
Date: Sat Jul  5 07:15:19 2014
New Revision: 268286
URL: http://svnweb.freebsd.org/changeset/base/268286

Log:
  Fix compile-time errors when NO_WERROR and WITHOUT_INET6_SUPPORT
  (NO_INET6) are specified.
  
  Approved by:	glebius
  MFC after:	1 week

Modified:
  head/contrib/ipfilter/lib/printhost.c
  head/contrib/ipfilter/lib/printhostmask.c
  head/contrib/ipfilter/lib/save_v1trap.c
  head/contrib/ipfilter/lib/save_v2trap.c

Modified: head/contrib/ipfilter/lib/printhost.c
==============================================================================
--- head/contrib/ipfilter/lib/printhost.c	Sat Jul  5 06:12:48 2014	(r268285)
+++ head/contrib/ipfilter/lib/printhost.c	Sat Jul  5 07:15:19 2014	(r268286)
@@ -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;

Modified: head/contrib/ipfilter/lib/printhostmask.c
==============================================================================
--- head/contrib/ipfilter/lib/printhostmask.c	Sat Jul  5 06:12:48 2014	(r268285)
+++ head/contrib/ipfilter/lib/printhostmask.c	Sat Jul  5 07:15:19 2014	(r268286)
@@ -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;

Modified: head/contrib/ipfilter/lib/save_v1trap.c
==============================================================================
--- head/contrib/ipfilter/lib/save_v1trap.c	Sat Jul  5 06:12:48 2014	(r268285)
+++ head/contrib/ipfilter/lib/save_v1trap.c	Sat Jul  5 07:15:19 2014	(r268286)
@@ -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;

Modified: head/contrib/ipfilter/lib/save_v2trap.c
==============================================================================
--- head/contrib/ipfilter/lib/save_v2trap.c	Sat Jul  5 06:12:48 2014	(r268285)
+++ head/contrib/ipfilter/lib/save_v2trap.c	Sat Jul  5 07:15:19 2014	(r268286)
@@ -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;



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