aligned_alloc() is C11 and not available everywhere. Also it would
require us to align the size value. So let's just invoke memalign()
instead, which is universally available and doesn't have any alignment
restrictions on the size parameter.
#endif
#include <fcntl.h>
+#include <malloc.h>
#include "util.h"
sz += ALIGN8(offsetof(struct kdbus_msg_item, str) + dl + 1);
}
- m->kdbus = aligned_alloc(8, sz);
+ m->kdbus = memalign(8, sz);
if (!m->kdbus)
return -ENOMEM;
for (;;) {
void *q;
- q = aligned_alloc(8, sz);
+ q = memalign(8, sz);
if (!q)
return -errno;