KINFO_FILE_SIZE is missing in libc on arm64

Open
#5,535 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
68/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
rust

Research direction

Start by inspecting the FreeBSD bindings in libc and the use of KINFO_FILE_SIZE at crates/fs/src/fs.rs:347. Compare the available architecture-specific definitions, then confirm that the gram-text-editor-3.3.0 FreeBSD build compiles successfully on arm64 without the missing-value error.

Written by the indexing model from the issue text.

Description

C-API-request

The gram-text-editor-3.3.0 project (FreeBSD port editors/gram) fails to compile:

error[E0425]: cannot find value `KINFO_FILE_SIZE` in crate `libc`
   --> crates/fs/src/fs.rs:347:60
    |
347 |         unsafe { (*kif.as_mut_ptr()).kf_structsize = libc::KINFO_FILE_SIZE; }
    |                                                            ^^^^^^^^^^^^^^^ not found in `libc`

libc-0.2.189
FreeBSD 15.1

Dominant language
Rust
Stars
2.6k
Forks
1.3k
Avg merge
2d 13h
Merged PRs (30d)
27

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from rust-lang/libc

All issues in rust-lang/libc

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.