StephanvanSchaik / mmap-rs

A cross-platform and safe Rust API to create and manage memory mappings in the virtual address space of the calling process.
Apache License 2.0
59 stars 17 forks source link

Compilation of 0.3.0 seems to be broken on macOS #3

Closed antekone closed 2 years ago

antekone commented 2 years ago

It seems that version 0.3.0, currently released on crates.io, is broken:

   Compiling mmap-rs v0.3.0
error[E0599]: no associated item named `MAP_JIT` found for struct `UnsafeMmapFlags` in the current scope
   --> /Users/antek/.cargo/registry/src/github.com-1ecc6299db9ec823/mmap-rs-0.3.0/src/os_impl/unix.rs:293:56
    |
293 |           if self.unsafe_flags.contains(UnsafeMmapFlags::MAP_JIT) {
    |                                                          ^^^^^^^ associated item not found in `UnsafeMmapFlags`
    |
   ::: /Users/antek/.cargo/registry/src/github.com-1ecc6299db9ec823/mmap-rs-0.3.0/src/lib.rs:18:1
    |
18  | / bitflags! {
19  | |     /// The available flags to configure the allocated mapping.
20  | |     pub struct MmapFlags: u32 {
21  | |         /// May initially map the pages as shared between multiple mappings, but creates a private
...   |
76  | |     }
77  | | }
    | |_- associated item `MAP_JIT` not found for this

I can see that this issue has been already resolved (i.e. I'm able to compile the git version on macOS without problems), but do you have any plans of releasing the fixed version to crates.io?

StephanvanSchaik commented 2 years ago

Thanks for the reminder! 0.4.0 is now available on crates.io.