Dmitry V. Levin
95b84ea641
* memfd_create.c: New file. * Makefile.am (strace_SOURCES): Add it. * linux/dummy.h (sys_memfd_create): Remove. * pathtrace.c (pathtrace_match): Add SEN_memfd_create. * xlat/memfd_create_flags.in: New file. * tests/memfd_create.c: New file. * tests/memfd_create.expected: Likewise. * tests/memfd_create.test: New test. * tests/Makefile.am: (check_PROGRAMS): Add memfd_create. (TESTS): Add memfd_create.test. (EXTRA_DIST): Add memfd_create.expected. * tests/.gitignore: Add memfd_create.
26 lines
241 B
C
26 lines
241 B
C
#ifdef HAVE_CONFIG_H
|
|
# include "config.h"
|
|
#endif
|
|
|
|
#include <unistd.h>
|
|
#include <sys/syscall.h>
|
|
|
|
#ifdef __NR_memfd_create
|
|
|
|
int
|
|
main(void)
|
|
{
|
|
syscall(__NR_memfd_create, "strace", 7);
|
|
return 0;
|
|
}
|
|
|
|
#else
|
|
|
|
int
|
|
main(void)
|
|
{
|
|
return 77;
|
|
}
|
|
|
|
#endif
|