netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] libnetlink: define __aligned conditionally
@ 2020-10-26 11:32 Johannes Berg
  0 siblings, 0 replies; only message in thread
From: Johannes Berg @ 2020-10-26 11:32 UTC (permalink / raw)
  To: netdev; +Cc: Stephen Hemminger, David Ahern

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>
---
 lib/libnetlink.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/libnetlink.c b/lib/libnetlink.c
index a7b60d873afb..c958aa57d0cd 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
-- 
2.26.2


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-10-26 11:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-26 11:32 [PATCH] libnetlink: define __aligned conditionally Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).