[systemd-devel] [PATCH] bus: Use memalign() if aligned_alloc() isn't available
Lennart Poettering
lennart at poettering.net
Wed Apr 17 09:37:29 PDT 2013
On Wed, 17.04.13 17:49, Henrik Grindal Bakken (hgb at ifi.uio.no) wrote:
> Use <features.h> and _GNU_SOURCE to determine if _ISOC11_SOURCE is
> available, and with that, aligned_alloc().
Hmm, we probably should just use memalign() everywhere. It's available
on all GNU systems and Solaris, which is more than enough for us. Also,
it doesn't put any restriction on whether the size passed needs to be
aligned, unlike aligned_alloc(). In this regard aligned_alloc() seems to
be less useful and less widely adopted, so let's just stop using it.
> +#define _GNU_SOURCE
We define that implicitly for all our sources anyway, btw.
Lennart
--
Lennart Poettering - Red Hat, Inc.
More information about the systemd-devel
mailing list