]> xenbits.xensource.com Git - xen.git/commitdiff
Fix issues introduced in 3a7f872a
authorWei Liu <wei.liu2@citrix.com>
Mon, 19 Sep 2016 18:13:04 +0000 (19:13 +0100)
committerWei Liu <wei.liu2@citrix.com>
Tue, 20 Sep 2016 13:05:11 +0000 (14:05 +0100)
3a7f872a ("tools: lift BUILD_BUG_ON to a tools header file") was taken
out from an rather old half finished branch by dropping unrelated
changes.  Unfortunately two issues sneaked in.

1. Hvmloader should be standalone. Revert the changes to hvmloader.
2. The define guard in libs.h was erroneously deleted. Add that back.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/firmware/hvmloader/rombios.c
tools/firmware/hvmloader/smbios.c
tools/firmware/hvmloader/util.h
tools/include/xen-tools/libs.h

index 1e853ec1c957b8d0de4ff4f45e597f884c838e0b..9acf03fa5f0e3f395f100fcf6ce02e3af701959f 100644 (file)
@@ -31,7 +31,6 @@
 #include "option_rom.h"
 
 #include <xen/hvm/params.h>
-#include <xen-tools/libs.h>
 
 #define ROM_INCLUDE_ROMBIOS
 #define ROM_INCLUDE_VGABIOS
index 0e61bd1950c337c433d8b70b94d4929be577f4fe..210c7b0d3525a08e9c27485f0b13df9239bc45f3 100644 (file)
@@ -26,7 +26,6 @@
 #include "util.h"
 #include "hypercall.h"
 #include <xen/hvm/hvm_xs_strings.h>
-#include <xen-tools/libs.h>
 
 /* SBMIOS handle base values */
 #define SMBIOS_HANDLE_TYPE0   0x0000
index 94292d6f2216d9e5de26022ec792b2867cbb3f47..0fb266e95a5f359648b762304e9c851b491112eb 100644 (file)
@@ -41,6 +41,7 @@ void __assert_failed(char *assertion, char *file, int line)
 void __bug(char *file, int line) __attribute__((noreturn));
 #define BUG() __bug(__FILE__, __LINE__)
 #define BUG_ON(p) do { if (p) BUG(); } while (0)
+#define BUILD_BUG_ON(p) ((void)sizeof(char[1 - 2 * !!(p)]))
 
 #define min_t(type,x,y) \
         ({ type __x = (x); type __y = (y); __x < __y ? __x: __y; })
index 9d8b4ab744ff542c72044c809aea272b55fe205f..e874fb8267c299163df2d47376646483373660bc 100644 (file)
@@ -1,4 +1,5 @@
 #ifndef __XEN_TOOLS_LIBS__
+#define __XEN_TOOLS_LIBS__
 
 #ifndef BUILD_BUG_ON
 #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)