Re: [PATCH iproute2-next v3] lib/fs: fix issue when {name,open}_to_handle_at() is not implemented

From: David Ahern
Date: Mon May 17 2021 - 12:16:17 EST


On 5/8/21 12:49 AM, Heiko Thiery wrote:
> With commit d5e6ee0dac64 the usage of functions name_to_handle_at() and
> open_by_handle_at() are introduced. But these function are not available
> e.g. in uclibc-ng < 1.0.35. To have a backward compatibility check for the
> availability in the configure script and in case of absence do a direct
> syscall.
>
> Fixes: d5e6ee0dac64 ("ss: introduce cgroup2 cache and helper functions")
> Cc: Dmitry Yakunin <zeil@xxxxxxxxxxxxxx>
> Cc: Petr Vorel <petr.vorel@xxxxxxxxx>
> Signed-off-by: Heiko Thiery <heiko.thiery@xxxxxxxxx>
> ---
> v3:
> - use correct syscall number (thanks to Petr Vorel)
> - add #include <sys/syscall.h> (thanks to Petr Vorel)
> - remove bogus parameters (thanks to Petr Vorel)
> - fix #ifdef (thanks to Petr Vorel)
> - added Fixes tag (thanks to David Ahern)
> - build test with buildroot 2020.08.3 using uclibc 1.0.34
>
> v2:
> - small correction to subject
> - removed IP_CONFIG_HANDLE_AT:=y option since it is not required
> - fix indentation in check function
> - removed empty lines (thanks to Petr Vorel)
> - add #define _GNU_SOURCE in check (thanks to Petr Vorel)
> - check only for name_to_handle_at (thanks to Petr Vorel)
>
> configure | 28 ++++++++++++++++++++++++++++
> lib/fs.c | 25 +++++++++++++++++++++++++
> 2 files changed, 53 insertions(+)
>

applied to iproute2-next.