[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen stable-4.2] tools/libxc: Fix build of 32bit toolstacks on CentOS 5.x following XSA-125
commit 16e7d9761803a5808b65b8fce2b08cc652c0134d Author: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> AuthorDate: Mon Apr 13 16:11:12 2015 +0000 Commit: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> CommitDate: Wed Aug 12 12:04:42 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> (cherry picked from commit 6c1cb3dba4ff97dd40909670755f24fcdf903012) Conflicts: tools/libxc/xc_domain.c Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> (cherry picked from commit c776b6429bb3be7a68e819de496a272a4d0cd2f4) --- tools/libxc/xc_domain.c | 13 +++++-------- 1 files changed, 5 insertions(+), 8 deletions(-) diff --git a/tools/libxc/xc_domain.c b/tools/libxc/xc_domain.c index 60f7137..808b867 100644 --- a/tools/libxc/xc_domain.c +++ b/tools/libxc/xc_domain.c @@ -1352,12 +1352,9 @@ int xc_domain_bind_pt_isa_irq( PT_IRQ_TYPE_ISA, 0, 0, 0, machine_irq)); } -#ifndef min -#define min(X, Y) ({ \ - const typeof (X) _x = (X); \ - const typeof (Y) _y = (Y); \ - (void) (&_x == &_y); \ - (_x < _y) ? _x : _y; }) +#ifndef min_t +#define min_t(type,x,y) \ + ({ type __x = (x); type __y = (y); __x < __y ? __x: __y; }) #endif int xc_domain_memory_mapping( xc_interface *xch, @@ -1380,7 +1377,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; @@ -1416,7 +1413,7 @@ int xc_domain_memory_mapping( return ret; } -#undef min +#undef min_t int xc_domain_ioport_mapping( xc_interface *xch, uint32_t domid, -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.2 _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |