From patchwork Mon Oct 26 11:32:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 1387703 X-Patchwork-Delegate: shemminger@vyatta.com Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=sipsolutions.net Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by ozlabs.org (Postfix) with ESMTP id 4CKYCz3kxXz9sSC for ; Mon, 26 Oct 2020 22:54:39 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1774102AbgJZLyi (ORCPT ); Mon, 26 Oct 2020 07:54:38 -0400 Received: from s3.sipsolutions.net ([144.76.43.62]:34148 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1770594AbgJZLyh (ORCPT ); Mon, 26 Oct 2020 07:54:37 -0400 X-Greylist: delayed 1296 seconds by postgrey-1.27 at vger.kernel.org; Mon, 26 Oct 2020 07:54:37 EDT Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94) (envelope-from ) id 1kX0kG-00CutW-3w; Mon, 26 Oct 2020 12:33:00 +0100 From: Johannes Berg To: netdev@vger.kernel.org Cc: Stephen Hemminger , David Ahern Subject: [PATCH] libnetlink: define __aligned conditionally Date: Mon, 26 Oct 2020 12:32:52 +0100 Message-Id: <20201026113252.18018-1-johannes@sipsolutions.net> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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 --- 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