[patch v3] aligned_alloc: conform to C17

Florian Weimer fw@deneb.enyo.de
Tue Mar 21 17:28:29 GMT 2023


* DJ Delorie via Libc-alpha:

> +/* For ISO C11.  */
> +static void *
> +__libc_aligned_alloc (size_t alignment, size_t bytes)
> +{

> +weak_alias (__libc_aligned_alloc, aligned_alloc)

I'm surprised that this even compiles.  This sort of makes the
function static and gives it external linkage.

Is anything calling __libc_aligned_alloc?

Perhaps you could use this?

  static void *
  weak_function
  aligned_alloc (size_t alignment, size_t bytes)
  {

Assuming that there are no internal callers.


More information about the Libc-alpha mailing list