Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: compilation on nightly #130

Merged
merged 1 commit into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion frida-gum/src/instruction_writer/aarch64/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ use {
gum_sys::GumArgument,
};

#[cfg(not(feature = "module-names"))]
#[cfg(not(any(
feature = "module-names",
feature = "backtrace",
feature = "memory-access-monitor"
)))]
use alloc::vec::Vec;

/// The Aarch64 instruction writer.
Expand Down
6 changes: 5 additions & 1 deletion frida-gum/src/instruction_writer/x86_64/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ use {
gum_sys::{gssize, GumArgument, GumBranchHint},
};

#[cfg(not(feature = "module-names"))]
#[cfg(not(any(
feature = "module-names",
feature = "backtrace",
feature = "memory-access-monitor"
)))]
use alloc::vec::Vec;

/// The x86/x86_64 instruction writer.
Expand Down
12 changes: 10 additions & 2 deletions frida-gum/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@
#![allow(clippy::needless_doctest_main)]
#![allow(clippy::missing_safety_doc)]

#[cfg(not(feature = "module-names"))]
#[cfg(not(any(
feature = "module-names",
feature = "backtrace",
feature = "memory-access-monitor"
)))]
extern crate alloc;

extern crate num;
Expand All @@ -71,7 +75,11 @@ use core::{
fmt::{Debug, Display, Formatter, LowerHex, UpperHex},
};

#[cfg(not(feature = "module-names"))]
#[cfg(not(any(
feature = "module-names",
feature = "backtrace",
feature = "memory-access-monitor"
)))]
use alloc::string::String;

pub mod stalker;
Expand Down
6 changes: 5 additions & 1 deletion frida-gum/src/memory_range.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ use core::{
ops::Range,
};

#[cfg(not(feature = "module-names"))]
#[cfg(not(any(
feature = "module-names",
feature = "backtrace",
feature = "memory-access-monitor"
)))]
use alloc::vec::Vec;

pub struct MatchPattern {
Expand Down
6 changes: 5 additions & 1 deletion frida-gum/src/module.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ use {
frida_gum_sys::{gboolean, gpointer, GumExportDetails, GumModuleDetails, GumSymbolDetails},
};

#[cfg(not(feature = "module-names"))]
#[cfg(not(any(
feature = "module-names",
feature = "backtrace",
feature = "memory-access-monitor"
)))]
use alloc::{boxed::Box, string::String, vec, vec::Vec};

extern "C" fn enumerate_ranges_callout(
Expand Down
6 changes: 5 additions & 1 deletion frida-gum/src/module_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ use {
frida_gum_sys as gum_sys,
};

#[cfg(not(feature = "module-names"))]
#[cfg(not(any(
feature = "module-names",
feature = "backtrace",
feature = "memory-access-monitor"
)))]
use alloc::{
boxed::Box,
string::{String, ToString},
Expand Down
9 changes: 6 additions & 3 deletions frida-gum/src/range_details.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,19 @@
extern crate alloc;
use {
crate::MemoryRange,
alloc::string::String,
core::{
ffi::{c_void, CStr},
marker::PhantomData,
},
frida_gum_sys as gum_sys,
};

#[cfg(not(feature = "module-names"))]
use alloc::boxed::Box;
#[cfg(not(any(
feature = "module-names",
feature = "backtrace",
feature = "memory-access-monitor"
)))]
use alloc::{boxed::Box, string::String};

/// The memory protection of an unassociated page.
#[derive(Clone, FromPrimitive)]
Expand Down
6 changes: 5 additions & 1 deletion frida-gum/src/stalker/transformer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ use {
core::{ffi::c_void, marker::PhantomData},
};

#[cfg(not(feature = "module-names"))]
#[cfg(not(any(
feature = "module-names",
feature = "backtrace",
feature = "memory-access-monitor"
)))]
use alloc::boxed::Box;

pub struct StalkerIterator<'a> {
Expand Down
1 change: 0 additions & 1 deletion frida/src/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
*/

use frida_sys::{FridaSpawnOptions, _FridaProcess};
use std::convert::TryInto;
use std::ffi::{CStr, CString};
use std::marker::PhantomData;

Expand Down
Loading