Skip to content

Commit 69a98fb

Browse files
committed
fix(sidecar): cast mode_t to u16 on macOS in shm_open_mode
1 parent d7d6fcd commit 69a98fb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

datadog-ipc/src/platform/unix/mem_handle_macos.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ pub fn set_shm_open_mode(mode: u32) {
7676
}
7777

7878
fn shm_open_mode() -> Mode {
79-
Mode::from_bits_truncate(SHM_OPEN_MODE.load(Ordering::Relaxed))
79+
Mode::from_bits_truncate(SHM_OPEN_MODE.load(Ordering::Relaxed) as u16)
8080
}
8181

8282
impl ShmHandle {

datadog-ipc/src/platform/unix/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ pub(crate) use mem_handle_macos::*;
2020
mod mem_handle;
2121
#[cfg(not(target_os = "macos"))]
2222
pub use mem_handle::set_shm_open_mode;
23-
#[cfg(target_os = "macos")]
24-
pub use mem_handle_macos::set_shm_open_mode;
2523
#[cfg(not(target_os = "macos"))]
2624
pub(crate) use mem_handle::*;
25+
#[cfg(target_os = "macos")]
26+
pub use mem_handle_macos::set_shm_open_mode;
2727

2828
#[no_mangle]
2929
#[cfg(polyfill_glibc_memfd)]

0 commit comments

Comments
 (0)