Skip to content

fix: add target_os = "android" to fix compilation - #70

Merged
alexcrichton merged 1 commit into
rust-lang:mainfrom
StackOverflowExcept1on:fix-android
Nov 30, 2026
Merged

alexcrichton merged 1 commit into
rust-lang:mainfrom
StackOverflowExcept1on:fix-android

Conversation

@StackOverflowExcept1on

@StackOverflowExcept1on StackOverflowExcept1on commented Jun 15, 2026 •

Copy link
Copy Markdown
Contributor

Resolves #69

@StackOverflowExcept1on

Copy link
Copy Markdown
Contributor Author

hmm

error[E0425]: cannot find value `MREMAP_MAYMOVE` in crate `libc`
  --> /data/data/com.termux/files/home/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/dlmalloc-0.2.14/src/unix.rs:39:41
   |
39 |         let flags = if can_move { libc::MREMAP_MAYMOVE } else { 0 };
   |                                         ^^^^^^^^^^^^^^ not found in `libc`

error[E0425]: cannot find function `mremap` in crate `libc`
    --> /data/data/com.termux/files/home/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/dlmalloc-0.2.14/src/unix.rs:40:34
     |
  40 |           let ptr = unsafe { libc::mremap(ptr.cast(), oldsize, newsize, flags) };
     |                                    ^^^^^^
     |
    ::: /data/data/com.termux/files/home/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.186/src/unix/mod.rs:1190:5
     |
1190 | /     pub fn mmap(
1191 | |         addr: *mut c_void,
1192 | |         len: size_t,
1193 | |         prot: c_int,
...    |
1196 | |         offset: off_t,
1197 | |     ) -> *mut c_void;
     | |_____________________- similarly named function `mmap` defined here
     |
help: a function with a similar name exists
     |
  40 -         let ptr = unsafe { libc::mremap(ptr.cast(), oldsize, newsize, flags) };
  40 +         let ptr = unsafe { libc::mmap(ptr.cast(), oldsize, newsize, flags) };
     |

error[E0425]: cannot find function `mremap` in crate `libc`
    --> /data/data/com.termux/files/home/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/dlmalloc-0.2.14/src/unix.rs:56:28
     |
  56 |               let rc = libc::mremap(ptr.cast(), oldsize, newsize, 0);
     |                              ^^^^^^
     |
    ::: /data/data/com.termux/files/home/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/libc-0.2.186/src/unix/mod.rs:1190:5
     |
1190 | /     pub fn mmap(
1191 | |         addr: *mut c_void,
1192 | |         len: size_t,
1193 | |         prot: c_int,
...    |
1196 | |         offset: off_t,
1197 | |     ) -> *mut c_void;
     | |_____________________- similarly named function `mmap` defined here
     |
help: a function with a similar name exists
     |
  56 -             let rc = libc::mremap(ptr.cast(), oldsize, newsize, 0);
  56 +             let rc = libc::mmap(ptr.cast(), oldsize, newsize, 0);
     |

@alexcrichton

Copy link
Copy Markdown
Member

Would you be willing to add this target to CI to verify it builds?

@StackOverflowExcept1on

Copy link
Copy Markdown
Contributor Author

@alexcrichton should be done

@alexcrichton
alexcrichton merged commit c05f62a into rust-lang:main Nov 30, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can't build on aarch64-linux-android

2 participants