Commit bc8776a
Bring back
Commit 732bf60 ("test/io_uring_register: kill old memfd test")
removed the `CONFIG_HAVE_MEMFD_CREATE`, which was previously used to
conditionally provide `memfd_create()` for an old test in
`test/io_uring_register.c`.
Reintroduce `CONFIG_HAVE_MEMFD_CREATE` to resolve Android build error
caused by commit:
93d3a7a ("examples/zcrx: udmabuf backed areas")
It added a call to `memfd_create()`, which is unavailable on some
Android toolchains, leading to the following build error:
```
zcrx.c:111:10: error: call to undeclared function 'memfd_create'; ISO C99 and \
later do not support implicit function declarations \
[-Wimplicit-function-declaration]
111 | memfd = memfd_create("udmabuf-test", MFD_ALLOW_SEALING);
| ^
```
Then, provide memfd_create() in examples/ if `CONFIG_HAVE_MEMFD_CREATE`
is not set to fix the build error.
v2 -> v3:
- Don't bother touching the test/ dir.
Link: https://lore.kernel.org/io-uring/3b28fddb-2171-4f2f-9729-0c0ed14d20cc@kernel.dk
v1 -> v2:
- Omit the old memfd test because it's not needed anymore.
Link: https://lore.kernel.org/io-uring/4bc75566-9cb5-42ec-a6b7-16e04062e0c6@kernel.dk
Co-authored-by: Ammar Faizi <ammarfaizi2@gnuweeb.org>
Signed-off-by: Ammar Faizi <ammarfaizi2@gnuweeb.org>
Signed-off-by: Alviro Iskandar Setiawan <alviro.iskandar@gnuweeb.org>
Link: https://lore.kernel.org/r/20250716144610.3938579-1-alviro.iskandar@gnuweeb.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>CONFIG_HAVE_MEMFD_CREATE to fix Android build error1 parent aa9a6b7 commit bc8776a
3 files changed
Lines changed: 32 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
379 | 379 | | |
380 | 380 | | |
381 | 381 | | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
382 | 398 | | |
383 | 399 | | |
384 | 400 | | |
| |||
539 | 555 | | |
540 | 556 | | |
541 | 557 | | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
542 | 561 | | |
543 | 562 | | |
544 | 563 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
16 | 24 | | |
17 | 25 | | |
18 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
20 | 25 | | |
0 commit comments