Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Oct 2013 15:29:42 +0000 (UTC)
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r256978 - head/usr.sbin/pkg
Message-ID:  <201310231529.r9NFTg1p027699@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bapt
Date: Wed Oct 23 15:29:42 2013
New Revision: 256978
URL: http://svnweb.freebsd.org/changeset/base/256978

Log:
  Fix build with gcc
  
  MFC after:	3 days

Modified:
  head/usr.sbin/pkg/dns_utils.c

Modified: head/usr.sbin/pkg/dns_utils.c
==============================================================================
--- head/usr.sbin/pkg/dns_utils.c	Wed Oct 23 15:24:05 2013	(r256977)
+++ head/usr.sbin/pkg/dns_utils.c	Wed Oct 23 15:29:42 2013	(r256978)
@@ -42,11 +42,11 @@ typedef union {
 static int
 srv_priority_cmp(const void *a, const void *b)
 {
+	const struct dns_srvinfo *da, *db;
 	unsigned int r, l;
-	struct dns_srvinfo *da, *db;
 
-       	da = *(struct dns_srvinfo **)a;
-	db = *(struct dns_srvinfo **)b;
+	da = *(struct dns_srvinfo * const *)a;
+	db = *(struct dns_srvinfo * const *)b;
 
 	l = da->priority;
 	r = db->priority;
@@ -57,12 +57,12 @@ srv_priority_cmp(const void *a, const vo
 static int
 srv_final_cmp(const void *a, const void *b)
 {
+	const struct dns_srvinfo *da, *db;
 	unsigned int r, l, wr, wl;
 	int res;
-	struct dns_srvinfo *da, *db;
 
-       	da = *(struct dns_srvinfo **)a;
-	db = *(struct dns_srvinfo **)b;
+	da = *(struct dns_srvinfo * const *)a;
+	db = *(struct dns_srvinfo * const *)b;
 
 	l = da->priority;
 	r = db->priority;



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