diff options
author | Ammar Faizi <ammarfaizi2@gmail.com> | 2021-09-11 13:10:04 +0700 |
---|---|---|
committer | Ammar Faizi <ammarfaizi2@gmail.com> | 2021-09-11 14:07:34 +0700 |
commit | 17d25f4c73b89dfc722a367914776577e266638c (patch) | |
tree | 131cbda7bfec4a0ddc1eee3c9d29e3fca7989715 /.github | |
parent | 6401b3149ff49458cf4fd330d74ff22abd90cb07 (diff) | |
download | liburing-17d25f4c73b89dfc722a367914776577e266638c.tar.gz |
test/io_uring_register: fix -Wimplicit-function-declaration of memfd_create
On some systems, there is no `memfd_create` function. This commit
fixes this:
```
CC io_uring_register
io_uring_register.c: In function 'test_shmem':
io_uring_register.c:514:10: warning: implicit declaration of function 'memfd_create' [-Wimplicit-function-declaration]
memfd = memfd_create("uring-shmem-test", 0);
^
```
Fix for this is based on an answer on Stack Overflow [1].
On Jun 16 '19 at 5:12, mosvy wrote:
> On older systems, you'll have to include linux/memfd.h for the MFD_
> defines, and call memfd_create() via the the syscall(2) wrapper
> (and include unistd.h and sys/syscall.h for it work).
>
Link: https://stackoverflow.com/a/56616264/7275114 [1]
Reported-by: Louvian Lyndal <louvianlyndal@gmail.com>
Tested-by: Louvian Lyndal <louvianlyndal@gmail.com>
Signed-off-by: Ammar Faizi <ammarfaizi2@gmail.com>
Diffstat (limited to '.github')
0 files changed, 0 insertions, 0 deletions