Re: [PATCH iproute-next v4 2/3] lib: Introduce ppp protocols
From: David Ahern <hidden>
Date: 2022-07-29 17:21:27
On 7/29/22 10:03 AM, Guillaume Nault wrote:
On Fri, Jul 29, 2022 at 08:58:07AM -0600, David Ahern wrote:quoted
On 7/29/22 2:50 AM, Wojciech Drewek wrote:quoted
PPP protocol field uses different values than ethertype. Introduce utilities for translating PPP protocols from strings to values and vice versa. Use generic API from utils in order to get proto id and name. Signed-off-by: Wojciech Drewek <redacted> --- v4: ppp_defs.h removed --- include/rt_names.h | 3 +++ lib/Makefile | 2 +- lib/ppp_proto.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 lib/ppp_proto.cUbuntu 20.04 with gcc 9.4 and clang 10.0 - both fail the same: $ make lib CC ppp_proto.o In file included from ppp_proto.c:9: ../include/uapi/linux/ppp_defs.h:151:5: error: unknown type name ‘__kernel_old_time_t’ 151 | __kernel_old_time_t xmit_idle; /* time since last NP packet sent */ | ^~~~~~~~~~~~~~~~~~~ ../include/uapi/linux/ppp_defs.h:152:5: error: unknown type name ‘__kernel_old_time_t’ 152 | __kernel_old_time_t recv_idle; /* time since last NP packet received */ | ^~~~~~~~~~~~~~~~~~~ make[1]: *** [../config.mk:58: ppp_proto.o] Error 1 make: *** [Makefile:77: all] Error 2Works for me on Debian 11 (Bullseye), where __kernel_old_time_t is defined in /usr/include/asm-generic/posix_types.h (package linux-libc-dev). I guess the Ubuntu 20.04 failure happens because it's based on Linux 5.4, while __kernel_old_time_t was introduced in v5.5 (by commit 94c467ddb273 ("y2038: add __kernel_old_timespec and __kernel_old_time_t")). Not sure how to resolve this. This series doesn't need the struct ppp_idle that depends on __kernel_old_time_t.
I can fix this by importing posix_types.h from kernel headers.