From: Johannes Berg Date: Mon, 26 Oct 2020 11:32:52 +0000 (+0100) Subject: libnetlink: define __aligned conditionally X-Git-Tag: v5.10.0~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9fc5bf734f6b25559a3227d8789efbc67156e575;p=thirdparty%2Fiproute2.git libnetlink: define __aligned conditionally On some systems (e.g. current Debian/stable) the inclusion of utils.h pulled in some other things that may end up defining __aligned, in a possibly different way than what we had here. Use our own definition only if there isn't one already. Fixes: d5acae244f9d ("libnetlink: add nl_print_policy() helper") Signed-off-by: Johannes Berg Signed-off-by: Stephen Hemminger --- diff --git a/lib/libnetlink.c b/lib/libnetlink.c index a7b60d873..c958aa57d 100644 --- a/lib/libnetlink.c +++ b/lib/libnetlink.c @@ -30,7 +30,9 @@ #include "libnetlink.h" #include "utils.h" +#ifndef __aligned #define __aligned(x) __attribute__((aligned(x))) +#endif #ifndef SOL_NETLINK #define SOL_NETLINK 270