RTEMS: types and constants that differ from the RTEMS headers

Abierto
#5,663 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
rust
Área
backend

Línea de trabajo

Start with the RTEMS 6 headers and the linked downstream CI log, then inspect the RTEMS-specific definitions and ctest configuration linked from the issue. Compare the listed types, constants, functions and missing declarations against those headers, including the related dirfd and st_atime build failures. Done means the reported ABI mismatches and missing APIs are addressed and the RTEMS checks pass.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

A ctest run against the RTEMS 6 headers on armv7-rtems-eabihf (the downstream CI from #5209, log) finds the differences below. The definitions involved are the same in RTEMS 7 (newlib 7d4336cf), except for the last item, which I only checked on RTEMS 6.

  • dirent has no d_off, d_reclen or d_namlen, so d_name is at 9 instead of 22, and std's read_dir hands readdir_r 272 bytes for a 280-byte struct
  • Size or alignment of pthread_attr_t, pthread_cond_t, pthread_condattr_t, pthread_mutex_t, pthread_rwlockattr_t, sem_t and cpu_set_t
  • sigaction starts with sa_flags on RTEMS
  • termios has no c_line, but has c_ispeed and c_ospeed
  • uid_t and gid_t are unsigned short as on espidf, horizon and vita, which also shifts stat, passwd and group
  • FNM_NOESCAPE is 1 and FNM_PATHNAME is 2
  • CLOCK_BOOTTIME is 7, not 4 (CLOCK_MONOTONIC)
  • rusage only has ru_utime and ru_stime, utsname has 48-byte fields and no domainname, and stat has no st_spare4
  • __errno does not exist, errno is thread-local
  • aligned_alloc resolves to newlib's, which needs the missing _memalign_r, because libc's -lc comes before -qrtems
  • 36 functions, 22 constants, loff_t, Dl_info and rlimit that RTEMS does not declare or implement (the FIXME(rtems) skips in the ctest config)

libc also lacks msghdr, cmsghdr and 129 of the names in unix.txt for RTEMS, e.g. the termios constants, F_OK and mprotect.

Not listed above because they break the std build rather than show up in ctest: #5655 (dirfd) and rust-lang/rust#164719 (st_atime), which is why the CI uses nightly-2026-10-19.

Lenguaje dominante
Rust
Estrellas
2.6k
Forks
1.3k
Merge medio
2 d 13 h
PR fusionados (30 d)
27

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de rust-lang/libc

Todos los issues de rust-lang/libc

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.