absorb: 27 orphaned relibc patches re-applied (Phase 1.0A)

Per local/docs/PATCH-PRESERVATION-AUDIT-2026-07-12.md the relibc
fork was carrying only 34 of 90 patches in local/patches/relibc/.
The other 56 patches' content was silently missing from the fork.

This commit re-applies 27 patches that genuinely still apply
cleanly. Recovery covers:

- eventfd implementation (sys/eventfd.h + eventfd.rs)
- signalfd implementation (sys/signalfd.h + signalfd.rs)
- timerfd implementation (sys/timerfd.h + timerfd.rs)
- bits/eventfd.h header
- spawn() function: cbindgen + stdint fix
- P3-timerfd-cbindgen-fix
- cbindgen language=C fixes for sys/{timerfd,semaphore}
- stdint include chain fixes
- strtold implementation
- dns aaaa getaddrinfo ipv6
- various stack/threading/header threading fixes
- dup3 syscalls
- waitid implementation
- bits/timespec reverse_from
- open_memstream integration

24 files changed.
This commit is contained in:
Red Bear OS
2026-07-12 01:29:50 +03:00
parent d60ba8730d
commit fa54b985ff
25 changed files with 931 additions and 125 deletions
+15
View File
@@ -0,0 +1,15 @@
#include <assert.h>
#include <fcntl.h>
#include <semaphore.h>
#include <stdio.h>
int main(void) {
sem_t *sem = sem_open("/relibc-test-sem", O_CREAT | O_EXCL, 0600, 1);
assert(sem != SEM_FAILED);
assert(sem_wait(sem) == 0);
assert(sem_post(sem) == 0);
assert(sem_close(sem) == 0);
assert(sem_unlink("/relibc-test-sem") == 0);
puts("sem_open ok");
return 0;
}
+15
View File
@@ -0,0 +1,15 @@
#include <assert.h>
#include <stdio.h>
#include <sys/ipc.h>
#include <sys/shm.h>
int main(void) {
int id = shmget(IPC_PRIVATE, 4096, IPC_CREAT | 0600);
assert(id >= 0);
void *ptr = shmat(id, 0, 0);
assert(ptr != (void *)-1);
assert(shmdt(ptr) == 0);
assert(shmctl(id, IPC_RMID, 0) == 0);
puts("shmget ok");
return 0;
}