[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen stable-4.4] tools/libxc: Fix build of 32bit toolstacks on CentOS 5.x following XSA-125



commit a2895efbcde8c54f0c9d9a6808ace02fe58e6944
Author:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
AuthorDate: Mon Apr 13 16:07:03 2015 +0000
Commit:     Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
CommitDate: Tue Jun 23 11:53:59 2015 +0100

    tools/libxc: Fix build of 32bit toolstacks on CentOS 5.x following XSA-125
    
    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 <andrew.cooper3@xxxxxxxxxx>
    CC: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
    CC: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
    CC: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
    CC: Wei Liu <wei.liu2@xxxxxxxxxx>
    Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
    (cherry picked from commit 12e817e281034f5881f46e0e4f1d127820101a78)
---
 tools/libxc/xc_domain.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/tools/libxc/xc_domain.c b/tools/libxc/xc_domain.c
index 40ca771..46eef92 100644
--- a/tools/libxc/xc_domain.c
+++ b/tools/libxc/xc_domain.c
@@ -1669,7 +1669,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;
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.4

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.