Skip to content

Commit

Permalink
fix windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
yellowhatter committed Dec 4, 2024
1 parent ae0ea35 commit 024519f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
3 changes: 3 additions & 0 deletions include/zenoh_commons.h
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,9 @@ typedef struct z_close_options_t {
*/
struct zc_owned_concurrent_close_handle_t *internal_out_concurrent;
#endif
#if !defined(Z_FEATURE_UNSTABLE_API)
uint8_t _dummy;
#endif
} z_close_options_t;
/**
* @brief A hello message-processing closure.
Expand Down
8 changes: 7 additions & 1 deletion src/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,16 +158,22 @@ pub struct z_close_options_t {
/// concurrently in separate task, and this handle will be initialized to be used for controlling
/// it's execution.
internal_out_concurrent: Option<&'static mut MaybeUninit<zc_owned_concurrent_close_handle_t>>,

#[cfg(not(feature = "unstable"))]
_dummy: u8,
}

/// Constructs the default value for `z_close_options_t`.
#[no_mangle]
#[allow(unused)]
pub extern "C" fn z_close_options_default(this_: &mut MaybeUninit<z_close_options_t>) {
#[cfg(feature = "unstable")]
this_.write(z_close_options_t {
#[cfg(feature = "unstable")]
internal_timeout_ms: 0,
#[cfg(feature = "unstable")]
internal_out_concurrent: None,
#[cfg(not(feature = "unstable"))]
_dummy: 0,
});
}

Expand Down

0 comments on commit 024519f

Please sign in to comment.