@ -12,7 +12,7 @@
# define READ_ONCE(slot) ((__typeof__(slot))(*(const volatile __typeof__(slot)*)&(slot)))
# define READ_ONCE(slot) ((__typeof__(slot))(*(const volatile __typeof__(slot)*)&(slot)))
# define WRITE_ONCE(slot, value) (*((volatile __typeof__(slot)*)&(slot)) = (value))
# define WRITE_ONCE(slot, value) (*((volatile __typeof__(slot)*)&(slot)) = (value))
__attribute__ ( ( gnu_inline ) )
__attribute__ ( ( gnu_inline /*, always_inline*/ ) )
static inline
static inline
int _memfd_secret_raw ( unsigned int flags )
int _memfd_secret_raw ( unsigned int flags )
{
{
@ -29,7 +29,7 @@ static inline
int _has_memfd_secret_raw ( )
int _has_memfd_secret_raw ( )
{
{
// Attempt syscall
// Attempt syscall
int fd = _memfd_secret _raw( FD_CLOEXEC ) ;
int fd = _memfd_secret ( 0 ) ; //XXX: NOTE: man page says `FD_CLOEXEC` is a valid flag, but using it returns `EINVAL`?
// If failure to create new fd was caused by `ENOSYS`, it is not available.
// If failure to create new fd was caused by `ENOSYS`, it is not available.
if ( fd < 0 & & errno = = ENOSYS )
if ( fd < 0 & & errno = = ENOSYS )