ItsEthra / memflex

Memory library for rust
MIT License
21 stars 5 forks source link

MacOS cannot find functions `...` in crate `libc` #6

Open freegamerskids opened 7 months ago

freegamerskids commented 7 months ago

process_vm_readv, process_vm_writev and __errno_location are the functions that weren't found. Any help is appreciated.

ItsEthra commented 7 months ago

process_vm_readv, process_vm_writev are only available on linux so to fix memory read/write on macos other way is needed. There is a pr to fix __errno_location but author didn't continue with it so I might end up rebasing it and fixing it myself some time later.

freegamerskids commented 7 months ago

process_vm_readv => mach_vm_read process_vm_writev => mach_vm_write

Hope this helps.

ItsEthra commented 7 months ago

I don't see them in libc docs under x86_64-apple-darwin target. I also do not own a macos device so unless someone wants to make a pr, this will be unresolved. Though I can cfg-out read/write function to fix compilation.

freegamerskids commented 7 months ago

They aren't defined in libc as they are MacOS specific. There is a crate specifically for mach functions though.