Whamcloud - gitweb
LU-15074 build: Use strlcpy if strscpy is not available 75/45175/5
authorShaun Tancheff <shaun.tancheff@hpe.com>
Sun, 10 Oct 2021 04:47:29 +0000 (11:47 +0700)
committerOleg Drokin <green@whamcloud.com>
Sun, 17 Oct 2021 18:12:32 +0000 (18:12 +0000)
commit7861d0754d42ed2a02a330eb730cb43f21dd30f2
tree71ca639e758c7092e6e8b0b902a75af83e0a262e
parent811d7aad74688825ef19c1f17a6320771ac2459e
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.

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/45175
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Petros Koutoupis <petros.koutoupis@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lnet/autoconf/lustre-lnet.m4
lnet/lnet/config.c