diff --git a/src/memfd_secret.c b/src/memfd_secret.c index 16f1468..4119795 100644 --- a/src/memfd_secret.c +++ b/src/memfd_secret.c @@ -12,7 +12,7 @@ #define READ_ONCE(slot) ((__typeof__(slot))(*(const volatile __typeof__(slot)*)&(slot))) #define WRITE_ONCE(slot, value) (*((volatile __typeof__(slot)*)&(slot)) = (value)) -__attribute__((gnu_inline)) +__attribute__((gnu_inline/*, always_inline*/)) static inline int _memfd_secret_raw(unsigned int flags) { @@ -29,7 +29,7 @@ static inline int _has_memfd_secret_raw() { // 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(fd < 0 && errno == ENOSYS)