From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f194.google.com ([209.85.192.194]:38056 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751540AbeB0REV (ORCPT ); Tue, 27 Feb 2018 12:04:21 -0500 Received: by mail-pf0-f194.google.com with SMTP id d26so8200089pfn.5 for ; Tue, 27 Feb 2018 09:04:21 -0800 (PST) Date: Tue, 27 Feb 2018 09:04:12 -0800 From: Stephen Hemminger To: Serhey Popovych Cc: netdev@vger.kernel.org, thomas.de_schampheleire@nokia.com Subject: Re: [PATCH iproute2 1/3] ip: Fix compilation with kernel headers < 3.4 Message-ID: <20180227090412.3de0f95e@xeon-e3> In-Reply-To: <1519733212-30703-2-git-send-email-serhe.popovych@gmail.com> References: <1519733212-30703-1-git-send-email-serhe.popovych@gmail.com> <1519733212-30703-2-git-send-email-serhe.popovych@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org List-ID: On Tue, 27 Feb 2018 14:06:50 +0200 Serhey Popovych wrote: > Since commit 596b1c94aa38 ("iproute: build more easily on Android"), > iproute2 uses types __kernel_long_t and __kernel_ulong_t but does not > provide internal definitions for it. > > This means that compilation using kernel headers that are older than 3.4 > (where these types were added) will fail. This situation may be uncommon > for native compilation, but not uncommon for cross compilation where the > toolchains may be a bit older. > > Provide the necessary types internally if not provided by the kernel > headers to fix compilation in such cases. > > Co-Developed-by: Serhii Popovych > Signed-off-by: Thomas De Schampheleire > Signed-off-by: Serhey Popovych > --- > Makefile | 5 ++++- > include/compat/kernel/linux/sysinfo.h | 14 ++++++++++++++ Why not just start a single file include/compat.h which is what other software does. Doing fine grained kernel and libc per file makes it more painful.