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

[Xen-changelog] [xen master] lzma: fix tools build



commit 95b62f9be3c5238ec54c63636ec0d81960074d32
Author:     Roger Pau Monne <roger.pau@xxxxxxxxxx>
AuthorDate: Fri Jul 20 10:32:42 2018 +0200
Commit:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Fri Jul 20 10:53:50 2018 +0100

    lzma: fix tools build
    
    Remove local definition of MIN and instead include the kernel.h header
    for the hypervisor build. Fixes the following error on the tools build:
    
    In file included from xc_dom_decompress_unsafe_lzma.c:8:0:
    ../../xen/common/unlzma.c:33:0: error: "MIN" redefined [-Werror]
     #define MIN(a, b) (((a) < (b)) ? (a) : (b))
     ^
    In file included from xc_private.h:43:0,
                     from xg_private.h:29,
                     from xc_dom_decompress_unsafe_lzma.c:5:
    
/home/osstest/build.125458.build-amd64/xen/stubdom/libxc-x86_64/../../tools/include/xen-tools/libs.h:21:0:
 note: this is the location of the previous definition
     #define MIN(x, y) ((x) < (y) ? (x) : (y))
     ^
    
    Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
    Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>
    Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
 xen/common/unlzma.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/xen/common/unlzma.c b/xen/common/unlzma.c
index e072e21599..9134277bba 100644
--- a/xen/common/unlzma.c
+++ b/xen/common/unlzma.c
@@ -30,8 +30,6 @@
 
 #include "decompress.h"
 
-#define        MIN(a, b) (((a) < (b)) ? (a) : (b))
-
 static long long INIT read_int(unsigned char *ptr, int size)
 {
        int i;
@@ -55,6 +53,7 @@ static long long INIT read_int(unsigned char *ptr, int size)
 
 #ifdef __XEN__
 #include <xen/compiler.h>
+#include <xen/kernel.h>
 #endif
 
 #define LZMA_IOBUF_SIZE        0x10000
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

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