diff options
Diffstat (limited to 'patches/device_memory.rs.patch')
-rw-r--r-- | patches/device_memory.rs.patch | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/patches/device_memory.rs.patch b/patches/device_memory.rs.patch new file mode 100644 index 0000000..becf2c2 --- /dev/null +++ b/patches/device_memory.rs.patch @@ -0,0 +1,40 @@ +diff --git a/src/memory/device_memory.rs b/src/memory/device_memory.rs +index 7f6bc8ff..be1eed9f 100644 +--- a/src/memory/device_memory.rs ++++ b/src/memory/device_memory.rs +@@ -19,7 +19,7 @@ use crate::OomError; + use crate::VulkanObject; + use std::error; + use std::fmt; +-#[cfg(target_os = "linux")] ++#[cfg(any(target_os = "android", target_os = "linux"))] + use std::fs::File; + use std::marker::PhantomData; + use std::mem::MaybeUninit; +@@ -27,7 +27,7 @@ use std::ops::Deref; + use std::ops::DerefMut; + use std::ops::Range; + use std::os::raw::c_void; +-#[cfg(target_os = "linux")] ++#[cfg(any(target_os = "android", target_os = "linux"))] + use std::os::unix::io::{FromRawFd, IntoRawFd}; + use std::ptr; + use std::sync::Arc; +@@ -178,7 +178,7 @@ impl<'a> DeviceMemoryBuilder<'a> { + /// # Panic + /// + /// - Panics if the import info has already been set. +- #[cfg(target_os = "linux")] ++ #[cfg(any(target_os = "android", target_os = "linux"))] + pub fn import_info( + mut self, + fd: File, +@@ -572,7 +572,7 @@ impl DeviceMemory { + /// + /// - Panics if the user requests an invalid handle type for this device memory object. + #[inline] +- #[cfg(target_os = "linux")] ++ #[cfg(any(target_os = "android", target_os = "linux"))] + pub fn export_fd( + &self, + handle_type: ExternalMemoryHandleType, |