rpc-tirpc: Fix deprecated glibc detection
PATCH 1/1 rpc-tirpc: Fix deprecated glibc detection
It's not enough to check for RPC headers. These can belong to libtirpc 64bit, which is not enough when compiling 32bit LTP without 32bit libtirpc.
--- m4/ltp-tirpc.m4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
m4/ltp-tirpc.m4 +2 -2
@@ -17,9 +17,9 @@ AC_DEFUN([LTP_CHECK_TIRPC], [ dnl rpc_broadcast() instead of clnt_broadcast()), but glibc implementation dnl does not have the new ones. We could either provide the deprecated dnl functions (copy from libtirpc src/rpc_soc.c) or drop glibc tests. - AC_CHECK_HEADERS([rpc/rpc.h], [have_rpc_headers=yes]) + AC_CHECK_FUNCS([xdr_char clnttcp_create], [have_rpc_glibc=yes]) - if test "x$have_libtirpc" = "xyes" -o "x$have_rpc_headers" = "xyes"; then + if test "x$have_libtirpc" = "xyes" -o "x$have_rpc_glibc" = "xyes"; then AC_SUBST(HAVE_RPC, 1) fi
Signature · 1 line
2.26.2
PATCH 1/1 rpc-tirpc: Fix deprecated glibc detection
Hi!
Quoted 15 lines
It's not enough to check for RPC headers. These can belong to libtirpc 64bit, which is not enough when compiling 32bit LTP without 32bit libtirpc.
Fixes 60b20c428 ("rpc: Enable and fix build basic RPC tests with glibc SunRPC")Signed-off-by Petr Vorel <[email protected]>--- m4/ltp-tirpc.m4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)m4/ltp-tirpc.m4 +0
-0
m4/ltp-tirpc.m4 AC_DEFUN([LTP_CHECK_TIRPC], [ · line 24
Quoted 10 lines
m4/ltp-tirpc.m4 +2
-2@@ -17,9 +17,9 @@ AC_DEFUN([LTP_CHECK_TIRPC], [ dnl rpc_broadcast() instead of clnt_broadcast()), but glibc implementation dnl does not have the new ones. We could either provide the deprecated dnl functions (copy from libtirpc src/rpc_soc.c) or drop glibc tests. - AC_CHECK_HEADERS([rpc/rpc.h], [have_rpc_headers=yes]) + AC_CHECK_FUNCS([xdr_char clnttcp_create], [have_rpc_glibc=yes]) - if test "x$have_libtirpc" = "xyes" -o "x$have_rpc_headers" = "xyes"; then + if test "x$have_libtirpc" = "xyes" -o "x$have_rpc_glibc" = "xyes"; then AC_SUBST(HAVE_RPC, 1) fi
Looks good to me, if you have tested this throughly I would like to have it in the release.
Signature · 2 lines
Cyril Hrubis [email protected]
PATCH 1/1 rpc-tirpc: Fix deprecated glibc detection
Hi Cyril,
Quoted 2 lines
Looks good to me, if you have tested this throughly I would like to have it in the release.
Yes, I tested it. Thanks a lot, merged.
Kind regards,
Petr