lzma: fix hypervisor build
PATCH 1/1 lzma: fix hypervisor 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))
^
---
Cc: Andrew Cooper <[email protected]>
Cc: George Dunlap <[email protected]>
Cc: Ian Jackson <[email protected]>
Cc: Jan Beulich <[email protected]>
Cc: Julien Grall <[email protected]>
Cc: Konrad Rzeszutek Wilk <[email protected]>
Cc: Stefano Stabellini <[email protected]>
Cc: Tim Deegan <[email protected]>
Cc: Wei Liu <[email protected]>
--- xen/common/unlzma.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
xen/common/unlzma.c +1 -2
@@ -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
Signature · 7 lines
2.18.0 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
The subject should be 'lzma: fix tools build'.
Roger.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 8 lines · Roger Pau Monne
Remove local definition of MIN and instead include the
kernel.hheader 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]
#defineMIN(a, b)(((a) < (b)) ? (a) : (b))
^
In file included from xc_private.h:43:0,
Quoted 7 lines
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
#defineMIN(x, y)((x) < (y) ? (x) : (y))
^Signed-off-by Roger Pau Monné <[email protected]>
Strangely I never saw this during my build.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 15 lines · Wei Liu
Quoted 14 lines · Roger Pau Monne
Remove local definition of MIN and instead include the
kernel.hheader 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]
#defineMIN(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
#defineMIN(x, y)((x) < (y) ? (x) : (y))
^
Quoted 5 lines
Quoted 1 line
Signed-off-by Roger Pau Monné <[email protected]>Acked-by Wei Liu <[email protected]>Strangely I never saw this during my build.
What did your ./configure run say about lzma support?
Juergen
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 16 lines · Juergen Gross
Quoted 15 lines · Wei Liu
Quoted 14 lines · Roger Pau Monne
Remove local definition of MIN and instead include the
kernel.hheader 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]
#defineMIN(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
#defineMIN(x, y)((x) < (y) ? (x) : (y))
^
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
Signed-off-by Roger Pau Monné <[email protected]>Acked-by Wei Liu <[email protected]>Strangely I never saw this during my build.
What did your ./configure run say about lzma support?
It appears that it got broken yesterday-ish so I never had a chance to see it. :-)
Wei.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel