]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
libnetlink: define __aligned conditionally
authorJohannes Berg <johannes@sipsolutions.net>
Mon, 26 Oct 2020 11:32:52 +0000 (12:32 +0100)
committerStephen Hemminger <stephen@networkplumber.org>
Wed, 28 Oct 2020 17:24:02 +0000 (10:24 -0700)
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 <johannes@sipsolutions.net>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
lib/libnetlink.c

index a7b60d873afba759702f3ee186e32ba9248e9302..c958aa57d0cd3c5d5beffa882631ac622dec4317 100644 (file)
@@ -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