Linux 6.8 compat: implement strlcpy fallback

Linux has removed strlcpy in favour of strscpy. This implements a
fallback implementation of strlcpy for this case.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Rob Norris <robn@despairlabs.com>
Sponsored-by: https://despairlabs.com/sponsor/
Closes #15805
This commit is contained in:
Rob Norris
2024-01-23 16:34:49 +11:00
committed by Brian Behlendorf
parent ce782d0804
commit 7466e09a49
7 changed files with 104 additions and 0 deletions
+1
View File
@@ -28,6 +28,7 @@
#include <sys/timer.h>
#include <sys/vmem.h>
#include <sys/wait.h>
#include <sys/string.h>
#include <linux/slab.h>
#include <linux/swap.h>
#include <linux/prefetch.h>
+1
View File
@@ -32,6 +32,7 @@
#include <sys/vmem.h>
#include <sys/cmn_err.h>
#include <sys/sysmacros.h>
#include <sys/string.h>
static kmutex_t kstat_module_lock;
static struct list_head kstat_module_list;
+1
View File
@@ -26,6 +26,7 @@
#include <sys/thread.h>
#include <sys/kmem.h>
#include <sys/tsd.h>
#include <sys/string.h>
/*
* Thread interfaces
+1
View File
@@ -30,6 +30,7 @@
#include <linux/file.h>
#include <linux/magic.h>
#include <sys/zone.h>
#include <sys/string.h>
#if defined(CONFIG_USER_NS)
#include <linux/statfs.h>