xen/xen-gcc45-fixes.patch

100 lines
4.9 KiB
Diff

--- xen-4.0.0-testing/tools/xenstore/xs_lib.c.orig 2010-03-01 08:28:04.000000000 -0700
+++ xen-4.0.0-testing/tools/xenstore/xs_lib.c 2010-03-01 09:12:04.000000000 -0700
@@ -149,7 +149,7 @@ bool xs_strings_to_perms(struct xs_permi
bool xs_perm_to_string(const struct xs_permissions *perm,
char *buffer, size_t buf_len)
{
- switch (perm->perms) {
+ switch ((int)perm->perms) {
case XS_PERM_WRITE:
*buffer = 'w';
break;
--- xen-4.0.0-testing/tools/blktap/lib/blktaplib.h.orig 2010-03-01 09:24:26.000000000 -0700
+++ xen-4.0.0-testing/tools/blktap/lib/blktaplib.h 2010-03-01 09:28:16.000000000 -0700
@@ -42,7 +42,7 @@
#include <sys/types.h>
#include <unistd.h>
-#define BLK_RING_SIZE __RING_SIZE((blkif_sring_t *)0, XC_PAGE_SIZE)
+#define BLK_RING_SIZE __CONST_RING_SIZE(blkif, XC_PAGE_SIZE)
/* size of the extra VMA area to map in attached pages. */
#define BLKTAP_VMA_PAGES BLK_RING_SIZE
--- xen-4.0.0-testing/tools/blktap2/include/blktaplib.h.orig 2010-03-01 09:46:30.000000000 -0700
+++ xen-4.0.0-testing/tools/blktap2/include/blktaplib.h 2010-03-01 09:46:50.000000000 -0700
@@ -45,7 +45,7 @@
#define EPRINTF(_f, _a...) syslog(LOG_ERR, "tap-err:%s: " _f, __func__, ##_a)
#define PERROR(_f, _a...) EPRINTF(_f ": %s", ##_a, strerror(errno))
-#define BLK_RING_SIZE __RING_SIZE((blkif_sring_t *)0, XC_PAGE_SIZE)
+#define BLK_RING_SIZE __CONST_RING_SIZE(blkif, XC_PAGE_SIZE)
/* size of the extra VMA area to map in attached pages. */
#define BLKTAP_VMA_PAGES BLK_RING_SIZE
--- xen-4.0.0-testing/xen/include/xen/compat.h.orig 2010-03-01 13:22:34.000000000 -0700
+++ xen-4.0.0-testing/xen/include/xen/compat.h 2010-03-01 14:30:34.000000000 -0700
@@ -129,8 +129,8 @@
#define CHECK_TYPE(name) \
- typedef int __checkT ## name[1 - ((xen_ ## name ## _t *)0 != \
- (compat_ ## name ## _t *)0) * 2]
+ typedef int __checkT ## name[1 - (sizeof(xen_ ## name ## _t) != \
+ sizeof(compat_ ## name ## _t)) * 2]
#define CHECK_TYPE_(k, n) \
typedef int __checkT ## k ## _ ## n[1 - ((k xen_ ## n *)0 != \
(k compat_ ## n *)0) * 2]
@@ -146,26 +146,30 @@
typedef int __checkF ## t ## __ ## f[1 - (&((xen_ ## t ## _t *)0)->f != \
&((compat_ ## t ## _t *)0)->f) * 2]
#define CHECK_FIELD_(k, n, f) \
- typedef int __checkF ## k ## _ ## n ## __ ## f[1 - (&((k xen_ ## n *)0)->f != \
- &((k compat_ ## n *)0)->f) * 2]
+ typedef int __checkF ## k ## _ ## n ## __ ## f[1 - (offsetof(k xen_ ## n,f) != \
+ offsetof(k compat_ ## n,f)) * 2]
#define CHECK_SUBFIELD_1(t, f1, f2) \
typedef int __checkF1 ## t ## __ ## f1 ## __ ## f2 \
- [1 - (&((xen_ ## t ## _t *)0)->f1.f2 != \
- &((compat_ ## t ## _t *)0)->f1.f2) * 2]
+ [1 - (offsetof(xen_ ## t ## _t,f1.f2) != \
+ offsetof(compat_ ## t ## _t,f1.f2)) * 2]
#define CHECK_SUBFIELD_1_(k, n, f1, f2) \
typedef int __checkF1 ## k ## _ ## n ## __ ## f1 ## __ ## f2 \
- [1 - (&((k xen_ ## n *)0)->f1.f2 != \
- &((k compat_ ## n *)0)->f1.f2) * 2]
+ [1 - (offsetof(k xen_ ## n,f1.f2) != \
+ offsetof(k compat_ ## n,f1.f2)) * 2]
#define CHECK_SUBFIELD_2(t, f1, f2, f3) \
typedef int __checkF2 ## t ## __ ## f1 ## __ ## f2 ## __ ## f3 \
- [1 - (&((xen_ ## t ## _t *)0)->f1.f2.f3 != \
- &((compat_ ## t ## _t *)0)->f1.f2.f3) * 2]
+ [1 - (offsetof(xen_ ## t ## _t,f1.f2.f3) != \
+ offsetof(compat_ ## t ## _t,f1.f2.f3)) * 2]
+#define CHECK_SUBFIELD_2_(k, n, f1, f2, f3) \
+ typedef int __checkF2 ## k ## _ ## n ## __ ## f1 ## __ ## f2 ## __ ## f3 \
+ [1 - (offsetof(k xen_ ## n,f1.f2.f3) != \
+ offsetof(k compat_ ## n,f1.f2.f3)) * 2]
#define CHECK_SUBFIELD_2_(k, n, f1, f2, f3) \
typedef int __checkF2 ## k ## _ ## n ## __ ## f1 ## __ ## f2 ## __ ## f3 \
- [1 - (&((k xen_ ## n *)0)->f1.f2.f3 != \
- &((k compat_ ## n *)0)->f1.f2.f3) * 2]
+ [1 - (offsetof(k xen_ ## n,f1.f2.f3) != \
+ offsetof(k compat_ ## n,f1.f2.f3)) * 2]
int hypercall_xlat_continuation(unsigned int *id, unsigned int mask, ...);
--- xen-4.0.0-testing/tools/ioemu-remote/block-vvfat.c.orig 2010-03-01 14:53:11.000000000 -0700
+++ xen-4.0.0-testing/tools/ioemu-remote/block-vvfat.c 2010-03-01 14:53:56.000000000 -0700
@@ -865,7 +865,8 @@ static int init_directories(BDRVVVFATSta
{
direntry_t* entry=array_get_next(&(s->directory));
entry->attributes=0x28; /* archive | volume label */
- snprintf((char*)entry->name,11,"QEMU VVFAT");
+ memcpy(entry->name,"QEMU VVF",8);
+ memcpy(entry->extension,"AT ",3);
}
/* Now build FAT, and write back information into directory */