lzma: fix tools build
authorRoger Pau Monne <roger.pau@citrix.com>
Fri, 20 Jul 2018 08:32:42 +0000 (10:32 +0200)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 20 Jul 2018 09:53:50 +0000 (10:53 +0100)
commit95b62f9be3c5238ec54c63636ec0d81960074d32
tree29c87c0f256b3535319309b3b55d72e464acbd33
parentd6371ccb93012db4ad6615fe666205b86308cb4e
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@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/common/unlzma.c