summarylogtreecommitdiffstats
path: root/0002-Linux-4.20-do_settimeofday-is-gone.patch
diff options
context:
space:
mode:
Diffstat (limited to '0002-Linux-4.20-do_settimeofday-is-gone.patch')
-rw-r--r--0002-Linux-4.20-do_settimeofday-is-gone.patch68
1 files changed, 68 insertions, 0 deletions
diff --git a/0002-Linux-4.20-do_settimeofday-is-gone.patch b/0002-Linux-4.20-do_settimeofday-is-gone.patch
new file mode 100644
index 00000000000..af1aa32ae82
--- /dev/null
+++ b/0002-Linux-4.20-do_settimeofday-is-gone.patch
@@ -0,0 +1,68 @@
+From fae55fbc736dc33e70e3eb2086993b4d3c37bd3f Mon Sep 17 00:00:00 2001
+From: Mark Vitale <mvitale@sinenomine.net>
+Date: Thu, 15 Nov 2018 15:31:37 -0500
+Subject: [PATCH 2/2] Linux 4.20: do_settimeofday is gone
+
+With Linux commit 976516404ff3fab2a8caa8bd6f5efc1437fed0b8 'y2038:
+remove unused time interfaces', do_settimeofday() is gone.
+
+However, OpenAFS only calls do_settimeofday() from afs_osi_SetTime(),
+which has been dead code since -settime support was removed from afsd
+with commit 1d9888be486198868983048eeffabdfef5afa94b 'Remove
+-settime/RXAFS_GetTime client support'.
+
+Instead of fixing afs_osi_SetTime() to use a current Linux API, remove
+it as dead code.
+
+No functional change is incurred by this commit. However, this change
+is required in order to build OpenAFS on Linux 4.20.
+
+Reviewed-on: https://gerrit.openafs.org/13392
+Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
+Tested-by: Benjamin Kaduk <kaduk@mit.edu>
+(cherry picked from commit aa80f892ec39e2984818090a6bb2047430836ee2)
+
+Change-Id: I7f5ee9c21bc87cd261d87126bc3848d941ff5409
+---
+ src/afs/LINUX/osi_misc.c | 12 ------------
+ src/afs/LINUX/osi_prototypes.h | 1 -
+ 2 files changed, 13 deletions(-)
+
+diff --git a/src/afs/LINUX/osi_misc.c b/src/afs/LINUX/osi_misc.c
+index 077d4edfb..655076779 100644
+--- a/src/afs/LINUX/osi_misc.c
++++ b/src/afs/LINUX/osi_misc.c
+@@ -28,18 +28,6 @@
+ int afs_osicred_initialized = 0;
+ afs_ucred_t afs_osi_cred;
+
+-void
+-afs_osi_SetTime(osi_timeval_t * tvp)
+-{
+- struct timespec tv;
+- tv.tv_sec = tvp->tv_sec;
+- tv.tv_nsec = tvp->tv_usec * NSEC_PER_USEC;
+-
+- AFS_STATCNT(osi_SetTime);
+-
+- do_settimeofday(&tv);
+-}
+-
+ void
+ osi_linux_mask(void)
+ {
+diff --git a/src/afs/LINUX/osi_prototypes.h b/src/afs/LINUX/osi_prototypes.h
+index 5002af1ca..70f6393f1 100644
+--- a/src/afs/LINUX/osi_prototypes.h
++++ b/src/afs/LINUX/osi_prototypes.h
+@@ -45,7 +45,6 @@ extern void osi_ioctl_init(void);
+ extern void osi_ioctl_clean(void);
+
+ /* osi_misc.c */
+-extern void afs_osi_SetTime(osi_timeval_t * tvp);
+ extern int osi_lookupname_internal(char *aname, int followlink,
+ struct vfsmount **mnt, struct dentry **dpp);
+ extern int osi_lookupname(char *aname, uio_seg_t seg, int followlink,
+--
+2.20.1
+