Skip to content
This repository has been archived by the owner on Sep 21, 2021. It is now read-only.

Fix build on uClibc Linux targets #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

operutka
Copy link

Hi! Recently, I stumbled upon this problem:

error[E0425]: cannot find function `posix_fallocate` in crate `libc`
   --> /home/operutka/.cargo/registry/src/github.com-1ecc6299db9ec823/fs3-0.5.0/src/unix.rs:110:30
    |
110 |     let ret = unsafe { libc::posix_fallocate(file.as_raw_fd(), 0, len as libc::off_t) };
    |                              ^^^^^^^^^^^^^^^ help: a constant with a similar name exists: `SYS_fallocate`
    | 
   ::: /home/operutka/.cargo/registry/src/github.com-1ecc6299db9ec823/libc-0.2.79/src/unix/uclibc/arm/mod.rs:924:1

when trying to build my project for a uClibc based Linux environment. Apparently, uClibc does not have the posix_fallocate function. This PR fixes the issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant