Skip to content

rtems: fix definitions that do not match RTEMS - #5755

Open
physwkim wants to merge 1 commit into
rust-lang:mainfrom
physwkim:rtems-fix-5663
Open

physwkim wants to merge 1 commit into
rust-lang:mainfrom
physwkim:rtems-fix-5663

Conversation

@physwkim

@physwkim physwkim commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Description

Found while running the libc CI downstream
(https://github.com/physwkim/libc-downstream-ci). Fix the RTEMS
definitions in the libc crate that do not match RTEMS.

Fixes #5663.

Claude was used to write and verify the code. The commit message was
written in Korean and machine-translated.

Checklist

  • Relevant tests in libc-test/semver have been updated
  • Commit messages permalink to headers for added or changed API
  • Placeholder or unstable values like *LAST or *MAX have the standard
    doc comment
  • Tested locally (cargo test -p libc-test --target mytarget);
    especially relevant for platforms that may not be checked in CI

@rustbot

This comment has been minimized.

@physwkim

Copy link
Copy Markdown
Contributor Author

@thesummer Backporting this to 0.2 needs compatibility adjustments in std.
Is there a reviewer available for that?

@rustbot

This comment has been minimized.

Found while running the libc CI downstream
(https://github.com/physwkim/libc-downstream-ci). Fix the RTEMS
definitions in the libc crate that do not match RTEMS.

Link: https://github.com/RTEMS/sourceware-mirror-newlib-cygwin/blob/1b3dcfdc6f1fd2bd3e1ef2f8b7df736c076c6042/newlib/libc/sys/rtems/include/sys/dirent.h#L81-L98
Link: https://github.com/RTEMS/sourceware-mirror-newlib-cygwin/blob/1b3dcfdc6f1fd2bd3e1ef2f8b7df736c076c6042/newlib/libc/sys/rtems/include/sys/_pthreadtypes.h#L47-L65
Link: https://github.com/RTEMS/sourceware-mirror-newlib-cygwin/blob/1b3dcfdc6f1fd2bd3e1ef2f8b7df736c076c6042/newlib/libc/sys/rtems/include/sys/_pthreadtypes.h#L148-L159
Link: https://github.com/RTEMS/sourceware-mirror-newlib-cygwin/blob/1b3dcfdc6f1fd2bd3e1ef2f8b7df736c076c6042/newlib/libc/sys/rtems/include/sys/_pthreadtypes.h#L181-L195
Link: https://github.com/RTEMS/sourceware-mirror-newlib-cygwin/blob/1b3dcfdc6f1fd2bd3e1ef2f8b7df736c076c6042/newlib/libc/sys/rtems/include/sys/_pthreadtypes.h#L248-L253
Link: https://github.com/RTEMS/sourceware-mirror-newlib-cygwin/blob/1b3dcfdc6f1fd2bd3e1ef2f8b7df736c076c6042/newlib/libc/include/sys/sched.h#L48-L61
Link: https://github.com/RTEMS/sourceware-mirror-newlib-cygwin/blob/1b3dcfdc6f1fd2bd3e1ef2f8b7df736c076c6042/newlib/libc/sys/rtems/include/semaphore.h#L40-L43
Link: https://github.com/RTEMS/sourceware-mirror-newlib-cygwin/blob/1b3dcfdc6f1fd2bd3e1ef2f8b7df736c076c6042/newlib/libc/sys/rtems/include/sys/_cpuset.h#L41-L50
Link: https://github.com/RTEMS/sourceware-mirror-newlib-cygwin/blob/1b3dcfdc6f1fd2bd3e1ef2f8b7df736c076c6042/newlib/libc/include/sys/signal.h#L75-L114
Link: https://github.com/RTEMS/sourceware-mirror-newlib-cygwin/blob/1b3dcfdc6f1fd2bd3e1ef2f8b7df736c076c6042/newlib/libc/sys/rtems/include/sys/_termios.h#L224-L236
Link: https://github.com/RTEMS/sourceware-mirror-newlib-cygwin/blob/1b3dcfdc6f1fd2bd3e1ef2f8b7df736c076c6042/newlib/libc/include/pwd.h#L47-L56
Link: https://github.com/RTEMS/sourceware-mirror-newlib-cygwin/blob/1b3dcfdc6f1fd2bd3e1ef2f8b7df736c076c6042/newlib/libc/include/fnmatch.h#L40-L41
Link: https://github.com/RTEMS/sourceware-mirror-newlib-cygwin/blob/1b3dcfdc6f1fd2bd3e1ef2f8b7df736c076c6042/newlib/libc/include/time.h#L283
Link: https://github.com/RTEMS/sourceware-mirror-newlib-cygwin/blob/1b3dcfdc6f1fd2bd3e1ef2f8b7df736c076c6042/newlib/libc/include/sys/stat.h#L47-L49
Link: https://github.com/RTEMS/rtems/blob/8b5a6cb7d64dcecc6b6c6f2377ddecdb860098d5/cpukit/include/sys/utsname.h#L64-L77
Link: https://github.com/RTEMS/sourceware-mirror-newlib-cygwin/blob/1b3dcfdc6f1fd2bd3e1ef2f8b7df736c076c6042/newlib/libc/include/sys/resource.h#L16-L19
Link: https://github.com/gcc-mirror/gcc/blob/b71f1de6e9cf7181a288c0f39f9b1ef6580cf5c8/gcc/config/rtems.h#L50-L52
Link: https://github.com/RTEMS/rtems/blob/de23ff5960decc2db58e75188a0ca28f4c6864d8/cpukit/libcsupport/src/alignedalloc.c#L36
Link: https://github.com/RTEMS/sourceware-mirror-newlib-cygwin/blob/1b3dcfdc6f1fd2bd3e1ef2f8b7df736c076c6042/newlib/libc/include/sys/_types.h#L59-L64
Link: https://github.com/RTEMS/sourceware-mirror-newlib-cygwin/blob/1b3dcfdc6f1fd2bd3e1ef2f8b7df736c076c6042/newlib/libc/include/sys/errno.h#L13-L22
Link: https://github.com/RTEMS/sourceware-mirror-newlib-cygwin/blob/1b3dcfdc6f1fd2bd3e1ef2f8b7df736c076c6042/newlib/libc/include/sys/signal.h#L310-L329

Assisted-by: LLM
@rustbot

rustbot commented Nov 23, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@physwkim

Copy link
Copy Markdown
Contributor Author

fix conflict with #5757

This branch has not been deployed

No deployments
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.

RTEMS: types and constants that differ from the RTEMS headers

2 participants