aboutsummaryrefslogtreecommitdiffstats
path: root/module/os/linux
diff options
context:
space:
mode:
authorRob Norris <[email protected]>2024-01-23 16:34:49 +1100
committerBrian Behlendorf <[email protected]>2024-01-29 14:53:29 -0800
commit7466e09a492b644d39d85dd173e0f8051858a2a5 (patch)
tree922d8943b52daae43836dcc10b54323625fefa14 /module/os/linux
parentce782d080432506a41b49df32af6f0013b5775db (diff)
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 <[email protected]> Signed-off-by: Rob Norris <[email protected]> Sponsored-by: https://despairlabs.com/sponsor/ Closes #15805
Diffstat (limited to 'module/os/linux')
-rw-r--r--module/os/linux/spl/spl-kmem-cache.c1
-rw-r--r--module/os/linux/spl/spl-kstat.c1
-rw-r--r--module/os/linux/spl/spl-thread.c1
-rw-r--r--module/os/linux/spl/spl-zone.c1
4 files changed, 4 insertions, 0 deletions
diff --git a/module/os/linux/spl/spl-kmem-cache.c b/module/os/linux/spl/spl-kmem-cache.c
index 4b1508171..42821ad60 100644
--- a/module/os/linux/spl/spl-kmem-cache.c
+++ b/module/os/linux/spl/spl-kmem-cache.c
@@ -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>
diff --git a/module/os/linux/spl/spl-kstat.c b/module/os/linux/spl/spl-kstat.c
index 430858114..ad553a73a 100644
--- a/module/os/linux/spl/spl-kstat.c
+++ b/module/os/linux/spl/spl-kstat.c
@@ -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;
diff --git a/module/os/linux/spl/spl-thread.c b/module/os/linux/spl/spl-thread.c
index b4ef86a5e..ee3eb4690 100644
--- a/module/os/linux/spl/spl-thread.c
+++ b/module/os/linux/spl/spl-thread.c
@@ -26,6 +26,7 @@
#include <sys/thread.h>
#include <sys/kmem.h>
#include <sys/tsd.h>
+#include <sys/string.h>
/*
* Thread interfaces
diff --git a/module/os/linux/spl/spl-zone.c b/module/os/linux/spl/spl-zone.c
index e821fbb4f..d0d0cca15 100644
--- a/module/os/linux/spl/spl-zone.c
+++ b/module/os/linux/spl/spl-zone.c
@@ -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>