mirror of
https://github.com/SCST-project/scst.git
synced 2026-09-20 15:04:19 +00:00
iscsi-scst: Port to Linux kernel v5.9
In Linux kernel v5.9 use of the KERNEL_SOCKPTR() function is mandatory when calling setsockopt(). Implement that function for kernels before v5.9. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9149 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -1727,6 +1727,16 @@ static inline struct kmem_cache *kmem_cache_create_usercopy(const char *name,
|
||||
sizeof_field(struct __struct, __field), NULL)
|
||||
#endif
|
||||
|
||||
/* <linux/sockptr.h> */
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 9, 0)
|
||||
/* See also commit ba423fdaa589 ("net: add a new sockptr_t type") # v5.9 */
|
||||
static inline void __user *KERNEL_SOCKPTR(void *p)
|
||||
{
|
||||
return (void __force __user *)p;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* <linux/stddef.h> */
|
||||
|
||||
#ifndef sizeof_field
|
||||
|
||||
Reference in New Issue
Block a user