diff --git a/srcpkgs/libselinux/patches/musl.patch b/srcpkgs/libselinux/patches/musl.patch new file mode 100644 index 00000000000..d4199f40610 --- /dev/null +++ b/srcpkgs/libselinux/patches/musl.patch @@ -0,0 +1,30 @@ +musl defines gettid(), current glibc is >2.30 + +--- a/src/procattr.c ++++ b/src/procattr.c +@@ -22,25 +22,6 @@ + static int destructor_key_initialized = 0; + static __thread char destructor_initialized; + +-/* Bionic and glibc >= 2.30 declare gettid() system call wrapper in unistd.h and +- * has a definition for it */ +-#ifdef __BIONIC__ +- #define OVERRIDE_GETTID 0 +-#elif !defined(__GLIBC_PREREQ) +- #define OVERRIDE_GETTID 1 +-#elif !__GLIBC_PREREQ(2,30) +- #define OVERRIDE_GETTID 1 +-#else +- #define OVERRIDE_GETTID 0 +-#endif +- +-#if OVERRIDE_GETTID +-static pid_t gettid(void) +-{ +- return syscall(__NR_gettid); +-} +-#endif +- + static void procattr_thread_destructor(void __attribute__((unused)) *unused) + { + if (prev_current != UNSET)