Whamcloud - gitweb
LU-17592 build: kernel 6.8 removed strlcpy()
[fs/lustre-release.git] / libcfs / autoconf / lustre-libcfs.m4
index 3048b6f..ba0c8d1 100644 (file)
@@ -625,7 +625,9 @@ AC_DEFUN([LIBCFS_SRC_STRSCPY_EXISTS], [
        LB2_LINUX_TEST_SRC([strscpy_exists], [
                #include <linux/string.h>
        ],[
-               strscpy((char *)NULL, (const char *)NULL, 0);
+               char buf[129];
+
+               strscpy(buf, "something", sizeof(buf));
        ],[-Werror])
 ])
 AC_DEFUN([LIBCFS_STRSCPY_EXISTS], [