LINUX 5.8: Replace kernel_setsockopt with new funcs
[openafs.git] / src / cf / linux-kernel-func.m4
index 0b17e17..5639bb8 100644 (file)
@@ -42,6 +42,9 @@ AC_CHECK_LINUX_FUNC([d_make_root],
 AC_CHECK_LINUX_FUNC([do_sync_read],
                     [#include <linux/fs.h>],
                     [do_sync_read(NULL, NULL, 0, NULL);])
+AC_CHECK_LINUX_FUNC([fatal_signal_pending],
+                    [#include <linux/sched.h>],
+                    [fatal_signal_pending(NULL);])
 AC_CHECK_LINUX_FUNC([file_dentry],
                     [#include <linux/fs.h>],
                     [struct file *f; file_dentry(f);])
@@ -72,9 +75,20 @@ AC_CHECK_LINUX_FUNC([iter_file_splice_write],
 AC_CHECK_LINUX_FUNC([kernel_setsockopt],
                     [#include <linux/net.h>],
                     [kernel_setsockopt(NULL, 0, 0, NULL, 0);])
+AC_CHECK_LINUX_FUNC([ktime_get_coarse_real_ts64],
+                    [#include <linux/ktime.h>],
+                    [struct timespec64 *s;
+                    ktime_get_coarse_real_ts64(s);])
+AC_CHECK_LINUX_FUNC([ktime_get_real_ts64],
+                    [#include <linux/ktime.h>],
+                    [struct timespec64 *s;
+                    ktime_get_real_ts64(s);])
 AC_CHECK_LINUX_FUNC([locks_lock_file_wait],
                     [#include <linux/fs.h>],
                     [locks_lock_file_wait(NULL, NULL);])
+AC_CHECK_LINUX_FUNC([override_creds],
+                    [#include <linux/cred.h>],
+                    [override_creds(0);])
 AC_CHECK_LINUX_FUNC([page_follow_link],
                     [#include <linux/fs.h>],
                     [page_follow_link(0,0);])
@@ -135,6 +149,17 @@ AC_CHECK_LINUX_FUNC([inode_lock],
                     [#include <linux/fs.h>],
                     [inode_lock(NULL);])
 
+dnl lru_cache_add_file added to Linux 2.6.28.
+AC_CHECK_LINUX_FUNC([lru_cache_add_file],
+                    [#include <linux/swap.h>],
+                    [lru_cache_add_file(NULL);])
+
+dnl Linux 5.8 replaced kernel_setsockopt with helper functions
+dnl e.g. ip_sock_set_mtu_discover, ip_sock_set_recverr
+AC_CHECK_LINUX_FUNC([ip_sock_set],
+                    [#include <net/ip.h>],
+                    [ip_sock_set_mtu_discover(NULL, 0);])
+
 dnl Consequences - things which get set as a result of the
 dnl                above tests
 AS_IF([test "x$ac_cv_linux_func_d_alloc_anon" = "xno"],