From owner-svn-src-head@FreeBSD.ORG Sat Jul 5 07:15:20 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E0C24287; Sat, 5 Jul 2014 07:15:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B4B5C2E5E; Sat, 5 Jul 2014 07:15:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s657FK7g073579; Sat, 5 Jul 2014 07:15:20 GMT (envelope-from cy@svn.freebsd.org) Received: (from cy@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s657FJEJ073575; Sat, 5 Jul 2014 07:15:19 GMT (envelope-from cy@svn.freebsd.org) Message-Id: <201407050715.s657FJEJ073575@svn.freebsd.org> From: Cy Schubert Date: Sat, 5 Jul 2014 07:15:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r268286 - head/contrib/ipfilter/lib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Jul 2014 07:15:21 -0000 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;