Commit ccb3a601 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Fix [24726]

parent b813408a
......@@ -109,22 +109,14 @@
* void *vlc_memalign( size_t align, size_t size, void **pp_orig )
* *pp_orig is the pointer that has to be freed afterwards.
*/
#if defined (HAVE_POSIX_MEMALIGN)
static inline
void *vlc_memalign (size_t align, size_t size, void **pp)
void *vlc_memalign (void **pp, size_t align, size_t size)
{
#if defined (HAVE_POSIX_MEMALIGN)
return posix_memalign (pp, align, size) ? NULL : *pp;
}
#elif defined (HAVE_MEMALIGN)
static inline
void *vlc_memalign (size_t align, size_t size, void **pp)
{
return *pp = memalign (align, size);
}
#else /* We don't have any choice but to align manually */
static inline
void *vlc_memalign (size_t align, size_t size, void **pp)
{
#else
unsigned char *ptr;
if (align < 1)
......@@ -138,6 +130,6 @@ void *vlc_memalign (size_t align, size_t size, void **pp)
*pp = ptr;
ptr += align;
return (void *)(((uintptr_t)ptr) & ~align);
}
#endif
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment