-
Notifications
You must be signed in to change notification settings - Fork 326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to compile for 4.18.1 kernel #136
Comments
Thanks @barrybingo. You saved my day since I couldn't copy a bunch of photos from my SD card. I hope this simple fix goes to mainstream soon. |
Here my timespec64 patch: index 312de36..6c097f5 100644
--- a/exfat_super.c
+++ b/exfat_super.c
@@ -147,8 +147,13 @@ static time_t accum_days_in_year[] = {
static void _exfat_truncate(struct inode *inode, loff_t old_size);
/* Convert a FAT time/date pair to a UNIX date (seconds since 1 1 70). */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,18,0)
+void exfat_time_fat2unix(struct exfat_sb_info *sbi, struct timespec64 *ts,
+ DATE_TIME_T *tp)
+#else
void exfat_time_fat2unix(struct exfat_sb_info *sbi, struct timespec *ts,
DATE_TIME_T *tp)
+#endif
{
time_t year = tp->Year;
time_t ld;
@@ -166,8 +171,13 @@ void exfat_time_fat2unix(struct exfat_sb_info *sbi, struct timespec *ts,
}
/* Convert linear UNIX date to a FAT time/date pair. */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,18,0)
+void exfat_time_unix2fat(struct exfat_sb_info *sbi, struct timespec64 *ts,
+ DATE_TIME_T *tp)
+#else
void exfat_time_unix2fat(struct exfat_sb_info *sbi, struct timespec *ts,
DATE_TIME_T *tp)
+#endif
{
time_t second = ts->tv_sec;
time_t day, month, year; |
Hoping this makes it into the project soon... having to manually patch each time I upgrade the kernel lately... 4.18.7 now.. 😉 |
Same issue with the new kernel 4.19. In addition to the provided patch, you also need to replace timespec with timespec64 and ktime_get_real_ts with ktime_get_real_ts64 in exfat_oal.c. I'll try to make a proper patch later. |
@barrybingo I was using your local branch for the past several months, but it has failed for me on 4.20. There is only one compilation error:
EDIT: thanks @ddscentral if you apply those two changes to @barrybingo branch it works! I've made a PR here: barrybingo#1 |
I hand-patched the driver on one of my devices because I needed to get the driver working ASAP. I didn't have time to make a proper patch, sorry.
Barrybingo's repo already includes a patch from CodeUnit (it's missing ifdefs though) to fix timespec64 errors. Your patch fixes exfat_oal.c errors. This should be enough to make exfat work on 4.20.
Be aware though, that to avoid breaking exfat-nofuse for older kernels, you should add ifdefs instead of just patching existing code.
See CodeUnit's patch here: #136 (comment)
I would also fix Barrybingo's patch since it's missing ifdefs and potentially breaks support for older kernels.
On 12/31/2018 3:02 PM, Tommy Carpenter wrote:
@ddscentral<https://github.com/ddscentral> do you have a proper working patch for 4.20?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#136 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AZN9D75L6ZtcPPWtKmVbMQdAR3VD_pgOks5u-gragaJpZM4WCJrG>.
|
@ddscentral yes I saw @barrybingo has updated so I will go back to using that branch. Hopefully the arch package |
I've been using exfat-nofuse for a long time but something seems to be broken with 4.18.1 kernel:
The text was updated successfully, but these errors were encountered: