Skip to contentSkip to conversation

provide a variant of __RING_SIZE() that is an integer constant expression

PATCH New Charles Arnold 1 participant 1 message Mar 5, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 provide a variant of __RING_SIZE() that is an integer constant expression

Without this new variant, gcc 4.5 won't compile where this is being used to specify array sizes. See also c/s 20975.

tools/blktap/lib/blktaplib.h +1 -1
diff -r b8d2a4134a68 tools/blktap/lib/blktaplib.h
@@ -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
tools/blktap2/include/blktaplib.h +1 -1
diff -r b8d2a4134a68 tools/blktap2/include/blktaplib.h
@@ -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-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel