@@ -54,3 +54,7 @@ typedef enum memory_order {
#include "qapi/error.h"
#include "chardev/char-serial.h"
#include "qemu/timer.h"
+#include "block/block.h"
+#include "block/block_int.h"
+#include "block/qdict.h"
+#include "qapi/qapi-visit-block-core.h"
@@ -58,7 +58,6 @@ pub unsafe trait Zeroable: Default {
/// ## Differences with `core::mem::zeroed`
///
/// `const_zero` zeroes padding bits, while `core::mem::zeroed` doesn't
-#[allow(unused)]
#[macro_export]
macro_rules! const_zero {
// This macro to produce a type-generic zero constant is taken from the
@@ -81,7 +80,6 @@ union TypeAsBytes {
}
/// A wrapper to implement the `Zeroable` trait through the `const_zero` macro.
-#[allow(unused)]
#[macro_export]
macro_rules! impl_zeroable {
($type:ty) => {
@@ -111,3 +109,6 @@ fn default() -> Self {
impl_zeroable!(crate::bindings::MemoryRegionOps);
impl_zeroable!(crate::bindings::MemTxAttrs);
}
+
+impl_zeroable!(crate::bindings::BlockDriver);
+impl_zeroable!(crate::bindings::BlockDriver__bindgen_ty_1);
Signed-off-by: Kevin Wolf <kwolf@redhat.com> --- rust/wrapper.h | 4 ++++ rust/qemu-api/src/zeroable.rs | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-)