Skip to content

hexagon: add missing constants and fix types for linux-musl#5042

Open
androm3da wants to merge 1 commit intorust-lang:mainfrom
androm3da:fix/hexagon-missing-constants
Open

hexagon: add missing constants and fix types for linux-musl#5042
androm3da wants to merge 1 commit intorust-lang:mainfrom
androm3da:fix/hexagon-missing-constants

Conversation

@androm3da
Copy link
Copy Markdown
Contributor

Add missing constants and fix type mismatches for
hexagon-unknown-linux-musl, enabling the rustix crate to build.

  • Constants added to errno, syscalls, poll, fs, memory, termios
  • Type fixes (c_int -> tcflag_t): EXTPROC, FLUSHO, IEXTEN, TOSTOP
  • ipc_perm.__seq changed from c_ushort to c_int with proper __pad1/__pad2 fields to match hexagon musl headers.

Description

Sources

Checklist

  • Relevant tests in libc-test/semver have been updated
  • No placeholder or unstable values like *LAST or *MAX are
    included (see #3131)
  • Tested locally (cd libc-test && cargo test --target mytarget);
    especially relevant for platforms that may not be checked in CI

Add missing constants and fix type mismatches for
hexagon-unknown-linux-musl, enabling the rustix crate to build.

* Constants added to errno, syscalls, poll, fs, memory, termios
* Type fixes (c_int -> tcflag_t): EXTPROC, FLUSHO, IEXTEN, TOSTOP
* ipc_perm.__seq changed from c_ushort to c_int with
proper __pad1/__pad2 fields to match hexagon musl headers.
Comment on lines +60 to +64
if target.contains("hexagon") {
cc::Build::new()
.file("src/time64_shim.c")
.compile("time64_shim");
}
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bit of an awkward hack - happy to consider another approach if there's a better way.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be resolved with #5040 right? If so, could this just be dropped until it makes it to nightly rustc? Shouldn't be terribly long.

Rest of the patch LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants