config: remove HAVE_KERNEL_STRSCPY

Sponsored-by: https://despairlabs.com/sponsor/
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de>
Signed-off-by: Rob Norris <robn@despairlabs.com>
Closes #16479
This commit is contained in:
Rob Norris
2024-08-03 13:54:24 +10:00
committed by Brian Behlendorf
parent d4bbe2ff38
commit eb230c789a
3 changed files with 1 additions and 33 deletions
-7
View File
@@ -25,10 +25,7 @@
#include <linux/string.h>
/* Fallbacks for kernel missing strlcpy */
#ifndef HAVE_KERNEL_STRLCPY
#if defined(HAVE_KERNEL_STRSCPY)
/*
* strscpy is strlcpy, but returns an error on truncation. strlcpy is defined
* to return strlen(src), so detect error and override it.
@@ -41,10 +38,6 @@ strlcpy(char *dest, const char *src, size_t size)
return ((size_t)ret);
return (strlen(src));
}
#else
#error "no strlcpy fallback available"
#endif
#endif /* HAVE_KERNEL_STRLCPY */
#endif /* _SPL_STRING_H */