--- glibc-2.28/stdlib/stdlib.h +++ glibc-2.28.old/stdlib/stdlib.h @@ -573,10 +573,14 @@ #endif #ifdef __USE_XOPEN2K +#ifdef BUILD_IRIDIUM +extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size); +#else /* Allocate memory of SIZE bytes with an alignment of ALIGNMENT. */ extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size) __THROW __nonnull ((1)) __wur; #endif +#endif #ifdef __USE_ISOC11 /* ISO C variant of aligned allocation. */ --- glibc-2.28.old/sysdeps/unix/sysv/linux/bits/mman-shared.h +++ glibc-2.28/sysdeps/unix/sysv/linux/bits/mman-shared.h @@ -49,27 +49,35 @@ memory. FLAGS is a combination of the MLOCK_* flags above. */ int mlock2 (const void *__addr, size_t __length, unsigned int __flags) __THROW; +#ifdef BUILD_IRIDIUM +int pkey_alloc (unsigned int __flags, unsigned int __access_rights); +int pkey_free (int __key); +int pkey_get (int __key); +int pkey_mprotect (void *__addr, size_t __len, int __prot, int __pkey); +int pkey_set (int __key, unsigned int __access_rights); +#else /* Allocate a new protection key, with the PKEY_DISABLE_* bits specified in ACCESS_RIGHTS. The protection key mask for the current thread is updated to match the access privilege for the new key. */ int pkey_alloc (unsigned int __flags, unsigned int __access_rights) __THROW; -/* Update the access rights for the current thread for KEY, which must - have been allocated using pkey_alloc. */ -int pkey_set (int __key, unsigned int __access_rights) __THROW; +/* Free an allocated protection key, which must have been allocated + using pkey_alloc. */ +int pkey_free (int __key) __THROW; /* Return the access rights for the current thread for KEY, which must have been allocated using pkey_alloc. */ int pkey_get (int __key) __THROW; -/* Free an allocated protection key, which must have been allocated - using pkey_alloc. */ -int pkey_free (int __key) __THROW; +/* Update the access rights for the current thread for KEY, which must + have been allocated using pkey_alloc. */ +int pkey_set (int __key, unsigned int __access_rights) __THROW; /* Apply memory protection flags for KEY to the specified address range. */ int pkey_mprotect (void *__addr, size_t __len, int __prot, int __pkey) __THROW; +#endif __END_DECLS ==== end of patch ====