Skip to content

Commit f16a3c4

Browse files
Larry Basselvijay-suman
authored andcommitted
selftests: add define for F_SEAL_FUTURE_WRITE
This is not defined in some cases leading to the memfd test not compiling. Define it in the source file. Orabug: 33891077 Signed-off-by: Larry Bassel <[email protected]> Reviewed-by: John Donnelly <[email protected]>
1 parent 1b984e3 commit f16a3c4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tools/testing/selftests/memfd/memfd_test.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -943,6 +943,11 @@ static void test_seal_write(void)
943943
* Test SEAL_FUTURE_WRITE
944944
* Test whether SEAL_FUTURE_WRITE actually prevents modifications.
945945
*/
946+
947+
#ifndef F_SEAL_FUTURE_WRITE
948+
#define F_SEAL_FUTURE_WRITE 0x0010 /* prevent future writes while mapped */
949+
#endif
950+
946951
static void test_seal_future_write(void)
947952
{
948953
int fd, fd2;

0 commit comments

Comments
 (0)