rust-lang / rust-lang/libc

`AF_SYSTEM` and `AF_SYS_CONTROL` types do not fit in `sockaddr_ctl`

Open
#3,044 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

C-bug E-easy
Dominant language
Rust
Stars
2.6k
Forks
1.3k
Avg merge
1d 22h
Merged PRs (30d)
69

Description

I'm trying to assign AF_SYSTEM to sockaddr_ctl.sc_family which is a u_char, but AF_SYSTEM is c_int.

AS_SYS_CONTROL should be u16 in sockaddr_ctl.ss_sysaddr as well yet its definition is c_int.

pub const AF_SYS_CONTROL: ::c_int = 2;

Contributor guide

Open the contributing guide

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.

Research direction

Start in src/unix/bsd/apple/mod.rs at the AF_SYSTEM and AF_SYS_CONTROL definitions and the sockaddr_ctl fields referenced in the issue. Compare their Rust types with the Apple platform ABI, then verify that the constants and fields accept the intended assignments without type mismatches.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
operating-systems
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.