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>
#include "option_rom.h"
#include <xen/hvm/params.h>
-#include <xen-tools/libs.h>
#define ROM_INCLUDE_ROMBIOS
#define ROM_INCLUDE_VGABIOS
#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
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; })
#ifndef __XEN_TOOLS_LIBS__
+#define __XEN_TOOLS_LIBS__
#ifndef BUILD_BUG_ON
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)