Whamcloud - gitweb
LU-15074 build: Use strlcpy if strscpy is not available
authorShaun Tancheff <shaun.tancheff@hpe.com>
Tue, 26 Mar 2024 07:11:51 +0000 (00:11 -0700)
committerAndreas Dilger <adilger@whamcloud.com>
Sat, 30 Mar 2024 07:23:02 +0000 (07:23 +0000)
commitdd969e4d1032da2403d89f1f7e3eae1b909deacf
treefe04dc289c010b7f9dcb0038104801f59cf5ac6c
parent0c2f22b4aa79900057bbac4610dbba4d2cd2516a
LU-15074 build: Use strlcpy if strscpy is not available

Linux commit v4.2-rc1-2-g30035e45753b
    string: provide strscpy()

    The strscpy() API is intended to be used instead of strlcpy(),
    and instead of most uses of strncpy().

Unfortunatley strscpy is not always available.

Test for strscpy and fallback to strlcpy when strscpy is
not available.

Lustre-change: https://review.whamcloud.com/45175
Lustre-commit: 7861d0754d42ed2a02a330eb730cb43f21dd30f2

Test-Parameters: trivial
Fixes: b77a6d86936 ("LU-14665 lnet: simplify lnet_ni_add_interface")
HPE-bug-id: LUS-9546
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: I43038e4a6260dafb57195ec3417ce009f5a3fad4
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/54569
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lnet/autoconf/lustre-lnet.m4
lnet/lnet/config.c