[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOG64qMdX08_apxfsvxg1wvyo7EWv9K-Swti3AN2vt_Lxfdcjw@mail.gmail.com>
Date: Tue, 19 Dec 2023 19:05:44 +0700
From: Alviro Iskandar Setiawan <alviro.iskandar@...weeb.org>
To: Ammar Faizi <ammarfaizi2@...weeb.org>
Cc: Jens Axboe <axboe@...nel.dk>, Michael William Jonathan <moe@...weeb.org>,
io-uring Mailing List <io-uring@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
"GNU/Weeb Mailing List" <gwml@...r.gnuweeb.org>
Subject: Re: [PATCH liburing v1 2/2] t/no-mmap-inval: Replace `valloc()` with `t_posix_memalign()`
On Tue, Dec 19, 2023 at 6:54 PM Ammar Faizi wrote:
> Address the limitations of valloc(). This function, which is primarily
> used for allocating page-aligned memory, is not only absent in some
> systems but is also marked as obsolete according to the `man 3 valloc`.
>
> Replace valloc() with t_posix_memalign() to fix the following build
> error:
>
> no-mmap-inval.c:28:56: warning: call to undeclared function 'valloc'; ISO C99 and \
> later do not support implicit function declarations [-Wimplicit-function-declaration]
> p.cq_off.user_addr = (unsigned long long) (uintptr_t) valloc(8192);
> ^
> 1 warning generated.
>
> ld.lld: error: undefined symbol: valloc
> >>> referenced by no-mmap-inval.c:28
> >>> /tmp/no-mmap-inval-ea16a2.o:(main)
> >>> did you mean: calloc
> >>> defined in: /system/lib64/libc.so
> clang-15: error: linker command failed with exit code 1 (use -v to see invocation)
> make[1]: *** [Makefile:239: no-mmap-inval.t] Error 1
>
> Signed-off-by: Ammar Faizi <ammarfaizi2@...weeb.org>
Reviewed-by: Alviro Iskandar Setiawan <alviro.iskandar@...weeb.org>
-- Viro
Powered by blists - more mailing lists