diff options
author | Dmitry V. Levin <ldv@strace.io> | 2021-02-19 08:00:00 +0000 |
---|---|---|
committer | Dmitry V. Levin <ldv@strace.io> | 2021-02-19 08:00:00 +0000 |
commit | 1dd2472f89b5e18575003344914598735d1d56b8 (patch) | |
tree | 44a9b283e50558fa0904fb893b3c1177c570f1ef /tests/memfd_create.c | |
parent | a51323a5090cff0db729a62238bb6ee9bdf69e15 (diff) | |
download | strace-1dd2472f89b5e18575003344914598735d1d56b8.tar.gz |
Switch to use bundled <linux/memfd.h> and <asm-generic/hugetlb_encode.h>
* bundled/linux/include/uapi/linux/memfd.h: New file, copied from
headers_install'ed Linux kernel v5.11.
* bundled/linux/include/uapi/asm-generic/hugetlb_encode.h: Likewise.
* bundled/Makefile.am (EXTRA_DIST): Add them.
* configure.ac (AC_CHECK_HEADERS): Remove linux/memfd.h.
* src/memfd.c: Include <linux/memfd.h> unconditionally, assume it
provides all necessary constants.
* tests/memfd.c: Likewise.
* src/xlat/memfd_create_flags.in: Add #unconditional, remove fallback
definitions.
Diffstat (limited to 'tests/memfd_create.c')
-rw-r--r-- | tests/memfd_create.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/tests/memfd_create.c b/tests/memfd_create.c index 4defbe3fd..70e0c8700 100644 --- a/tests/memfd_create.c +++ b/tests/memfd_create.c @@ -16,18 +16,7 @@ # include <stdio.h> # include <stdint.h> # include <unistd.h> - -# ifdef HAVE_LINUX_MEMFD_H -# include <linux/memfd.h> -# endif - -# ifndef MFD_HUGE_SHIFT -# define MFD_HUGE_SHIFT 26 -# endif - -# ifndef MFD_HUGE_MASK -# define MFD_HUGE_MASK 0x3f -# endif +# include <linux/memfd.h> static const char *errstr; |