From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf0-f68.google.com ([209.85.215.68]:43414 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751742AbeB0TfF (ORCPT ); Tue, 27 Feb 2018 14:35:05 -0500 Received: by mail-lf0-f68.google.com with SMTP id q69so29239727lfi.10 for ; Tue, 27 Feb 2018 11:35:04 -0800 (PST) Subject: Re: [PATCH iproute2 1/3] ip: Fix compilation with kernel headers < 3.4 To: Stephen Hemminger Cc: netdev@vger.kernel.org, thomas.de_schampheleire@nokia.com References: <1519733212-30703-1-git-send-email-serhe.popovych@gmail.com> <1519733212-30703-2-git-send-email-serhe.popovych@gmail.com> <20180227090412.3de0f95e@xeon-e3> From: Serhey Popovych Message-ID: <88f6c9ea-3ac1-ba78-aeb3-03d37d5a0bb1@gmail.com> Date: Tue, 27 Feb 2018 21:34:56 +0200 MIME-Version: 1.0 In-Reply-To: <20180227090412.3de0f95e@xeon-e3> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="tpWQWKsgBsqTqvEizHtLvBg2a74huJBaJ" Sender: netdev-owner@vger.kernel.org List-ID: This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --tpWQWKsgBsqTqvEizHtLvBg2a74huJBaJ Content-Type: multipart/mixed; boundary="fCwfpjDLD7uOeNvdANt5AV8IYoucyRvUF"; protected-headers="v1" From: Serhey Popovych To: Stephen Hemminger Cc: netdev@vger.kernel.org, thomas.de_schampheleire@nokia.com Message-ID: <88f6c9ea-3ac1-ba78-aeb3-03d37d5a0bb1@gmail.com> Subject: Re: [PATCH iproute2 1/3] ip: Fix compilation with kernel headers < 3.4 References: <1519733212-30703-1-git-send-email-serhe.popovych@gmail.com> <1519733212-30703-2-git-send-email-serhe.popovych@gmail.com> <20180227090412.3de0f95e@xeon-e3> In-Reply-To: <20180227090412.3de0f95e@xeon-e3> --fCwfpjDLD7uOeNvdANt5AV8IYoucyRvUF Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Stephen Hemminger wrote: > On Tue, 27 Feb 2018 14:06:50 +0200 > Serhey Popovych wrote: >=20 >> 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= =2E4 >> (where these types were added) will fail. This situation may be uncomm= on >> for native compilation, but not uncommon for cross compilation where t= he >> 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 ++++++++++++++ >=20 > Why not just start a single file include/compat.h which is what > other software does. Yes it is good, but not for our case. We use include_next to define __kernel_long_t and __kernel_ulong_t types if they not defined. If doing single we need to include it in nearly all .c files as first include file. I also start thinking on single and found it bit complicated than just adding header, (re)defining functionality and then include_next= =2E >=20 > Doing fine grained kernel and libc per file makes it more painful. Agree, and we already have done using similar schema that is reverted with this series. >=20 --fCwfpjDLD7uOeNvdANt5AV8IYoucyRvUF-- --tpWQWKsgBsqTqvEizHtLvBg2a74huJBaJ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQEcBAEBAgAGBQJalbLkAAoJEBTawMmQ61bBdPYIALa/JK+TY8dSoxINSUcv1U6G MqowXTQVq9C79TgYiQbc18xzZSCjQAs6h1HB9IT2GEdZ8eKs6sA7hb42VwvG+JZb P1PRO6Y7Kc5KDvsPRQRs6jPWdrLDn2IysS7HF8w5JcGQ7D683T1f4JJHQuSLqK/H vTlx2MMHnSw7r++zjKdlVeXKQNovQeY3DFc9uMX86/UgWyz62yNW7iPQW9tMhK4G cB0zDc8H0L0AeF3Ob2OcmLIiwTMKstROra39gtb/dAwUVVrG+wHsqzuL3+KIHyLl 4jU/mvdm2I86wGUwH5uWLqPfKjL0zfPbUSISG/GyDbaJBbjcvYVbBXSH33SYU0k= =kq/M -----END PGP SIGNATURE----- --tpWQWKsgBsqTqvEizHtLvBg2a74huJBaJ--