libs/pipewire: guard Linux-only MAP_LOCKED + prctl for Redox

Port pipewire's Linux-isms to Redox (baked into vendored source/):
 - mem.c: add __redox__ to the BSD/GNU guard that #defines MAP_LOCKED 0 (Redox
   has no page-locking; the flag is a no-op).
 - pipewire.c: guard #include <sys/prctl.h> and the prctl(PR_GET_NAME) thread-
   name block for __redox__ (Redox has no prctl; thread naming is skipped).
alloca resolved on a clean cook (-include alloca.h + staged relibc alloca.h).
This commit is contained in:
2026-08-01 08:59:50 +03:00
parent 0370d0f514
commit 9b1176e4e7
2 changed files with 4 additions and 2 deletions
@@ -68,7 +68,7 @@ static inline int memfd_create(const char *name, unsigned int flags)
#define HAVE_MEMFD_CREATE 1
#endif
#if defined(__FreeBSD__) || defined(__MidnightBSD__) || defined(__GNU__)
#if defined(__FreeBSD__) || defined(__MidnightBSD__) || defined(__GNU__) || defined(__redox__)
#define MAP_LOCKED 0
#endif
@@ -8,8 +8,10 @@
#include <limits.h>
#include <stdio.h>
#if !defined(__FreeBSD__) && !defined(__MidnightBSD__) && !defined(__GNU__)
#ifndef __redox__
#include <sys/prctl.h>
#endif
#endif
#include <pwd.h>
#include <errno.h>
#include <dlfcn.h>
@@ -738,7 +740,7 @@ static void init_prgname(void)
}
}
#endif
#if !defined(__FreeBSD__) && !defined(__MidnightBSD__) && !defined(__GNU__)
#if !defined(__FreeBSD__) && !defined(__MidnightBSD__) && !defined(__GNU__) && !defined(__redox__)
{
if (prctl(PR_GET_NAME, (unsigned long) name, 0, 0, 0) == 0) {
prgname = name;