You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
324 B

#include <sys/mman.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdio.h>
#include <memfd_secret.h>
int main()
{
int fd = memfd_secret(0);
if(fd < 0) {
perror("memfd_secret() failed");
return 1;
}
printf("Created memfd_secret (sec: %d): fd = %d\n", (int)_has_memfd_secret(), fd);
close(fd);
return 0;
}