From owner-svn-src-all@FreeBSD.ORG Fri May 16 15:32:17 2014 Return-Path: Delivered-To: svn-src-all@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 7D552DB3; Fri, 16 May 2014 15:32:17 +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 510102B59; Fri, 16 May 2014 15:32:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4GFWHbg006506; Fri, 16 May 2014 15:32:17 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4GFWGvh006504; Fri, 16 May 2014 15:32:16 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201405161532.s4GFWGvh006504@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Fri, 16 May 2014 15:32:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r266238 - head/contrib/ldns/ldns X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 May 2014 15:32:17 -0000 Author: des Date: Fri May 16 15:32:16 2014 New Revision: 266238 URL: http://svnweb.freebsd.org/changeset/base/266238 Log: Don't cast away the const qualifier. Fixes gcc build. Modified: head/contrib/ldns/ldns/util.h head/contrib/ldns/ldns/util.h.in Modified: head/contrib/ldns/ldns/util.h ============================================================================== --- head/contrib/ldns/ldns/util.h Fri May 16 15:02:12 2014 (r266237) +++ head/contrib/ldns/ldns/util.h Fri May 16 15:32:16 2014 (r266238) @@ -70,9 +70,9 @@ INLINE uint16_t ldns_read_uint16(const void *src) { #ifdef ALLOW_UNALIGNED_ACCESSES - return ntohs(*(uint16_t *) src); + return ntohs(*(const uint16_t *) src); #else - uint8_t *p = (uint8_t *) src; + const uint8_t *p = (const uint8_t *) src; return ((uint16_t) p[0] << 8) | (uint16_t) p[1]; #endif } @@ -81,9 +81,9 @@ INLINE uint32_t ldns_read_uint32(const void *src) { #ifdef ALLOW_UNALIGNED_ACCESSES - return ntohl(*(uint32_t *) src); + return ntohl(*(const uint32_t *) src); #else - uint8_t *p = (uint8_t *) src; + const uint8_t *p = (const uint8_t *) src; return ( ((uint32_t) p[0] << 24) | ((uint32_t) p[1] << 16) | ((uint32_t) p[2] << 8) Modified: head/contrib/ldns/ldns/util.h.in ============================================================================== --- head/contrib/ldns/ldns/util.h.in Fri May 16 15:02:12 2014 (r266237) +++ head/contrib/ldns/ldns/util.h.in Fri May 16 15:32:16 2014 (r266238) @@ -70,9 +70,9 @@ INLINE uint16_t ldns_read_uint16(const void *src) { #ifdef ALLOW_UNALIGNED_ACCESSES - return ntohs(*(uint16_t *) src); + return ntohs(*(const uint16_t *) src); #else - uint8_t *p = (uint8_t *) src; + const uint8_t *p = (const uint8_t *) src; return ((uint16_t) p[0] << 8) | (uint16_t) p[1]; #endif } @@ -81,9 +81,9 @@ INLINE uint32_t ldns_read_uint32(const void *src) { #ifdef ALLOW_UNALIGNED_ACCESSES - return ntohl(*(uint32_t *) src); + return ntohl(*(const uint32_t *) src); #else - uint8_t *p = (uint8_t *) src; + const uint8_t *p = (const uint8_t *) src; return ( ((uint32_t) p[0] << 24) | ((uint32_t) p[1] << 16) | ((uint32_t) p[2] << 8)