public inbox for [email protected]
 help / color / mirror / Atom feed
From: Alviro Iskandar Setiawan <[email protected]>
To: Ammar Faizi <[email protected]>
Cc: Jens Axboe <[email protected]>,
	Michael William Jonathan <[email protected]>,
	 io-uring Mailing List <[email protected]>,
	 Linux Kernel Mailing List <[email protected]>,
	 "GNU/Weeb Mailing List" <[email protected]>
Subject: Re: [PATCH liburing v1 2/2] t/no-mmap-inval: Replace `valloc()` with `t_posix_memalign()`
Date: Tue, 19 Dec 2023 19:05:44 +0700	[thread overview]
Message-ID: <CAOG64qMdX08_apxfsvxg1wvyo7EWv9K-Swti3AN2vt_Lxfdcjw@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>

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 <[email protected]>

Reviewed-by: Alviro Iskandar Setiawan <[email protected]>

-- Viro

  reply	other threads:[~2023-12-19 12:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-19 11:54 [PATCH liburing v1 0/2] Makefile and t/no-mmap-inval updates Ammar Faizi
2023-12-19 11:54 ` [PATCH liburing v1 1/2] Makefile: Remove the `partcheck` target Ammar Faizi
2023-12-19 11:54 ` [PATCH liburing v1 2/2] t/no-mmap-inval: Replace `valloc()` with `t_posix_memalign()` Ammar Faizi
2023-12-19 12:05   ` Alviro Iskandar Setiawan [this message]
2023-12-19 15:22 ` [PATCH liburing v1 0/2] Makefile and t/no-mmap-inval updates Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAOG64qMdX08_apxfsvxg1wvyo7EWv9K-Swti3AN2vt_Lxfdcjw@mail.gmail.com \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox