From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: [PATCH] tools/libxc: Fix build of 32bit toolstacks on CentOS 5.x following XSA-125 Date: Mon, 13 Apr 2015 17:03:03 +0100 Message-ID: <1428940983-8709-1-git-send-email-andrew.cooper3@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Xen-devel Cc: Andrew Cooper , Wei Liu , Ian Jackson , Ian Campbell List-Id: xen-devel@lists.xenproject.org gcc 4.1 of CentOS 5.x era does not like the typecheck in min() between uint64_t and unsigned long. Signed-off-by: Andrew Cooper CC: Konrad Rzeszutek Wilk CC: Ian Campbell CC: Ian Jackson CC: Wei Liu --- This needs backporting to 4.5 --- tools/libxc/xc_domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libxc/xc_domain.c b/tools/libxc/xc_domain.c index 95e3098..9434045 100644 --- a/tools/libxc/xc_domain.c +++ b/tools/libxc/xc_domain.c @@ -2034,7 +2034,7 @@ int xc_domain_memory_mapping( max_batch_sz = nr_mfns; do { - nr = min(nr_mfns - done, max_batch_sz); + nr = min_t(unsigned long, nr_mfns - done, max_batch_sz); domctl.u.memory_mapping.nr_mfns = nr; domctl.u.memory_mapping.first_gfn = first_gfn + done; domctl.u.memory_mapping.first_mfn = first_mfn + done; -- 1.7.10.4