dorimanx / exfat-nofuse

Android ARM Linux non-fuse read/write kernel driver for exFat and VFat Android file systems
GNU General Public License v2.0
707 stars 326 forks source link

Make error: implicit declaration of funtion #121

Open michael-ford opened 6 years ago

michael-ford commented 6 years ago

Hey there, trying to compile on galliumOS kernel 4.8.17 and getting the following make error - sorry I'm a bit of a C noob so not sure where to start. Suggestions?

make -C /lib/modules/4.8.17-galliumos/build M=/media/sd/Downloads/exfat-nofuse modules make[1]: Entering directory '/usr/src/linux-headers-4.8.17-galliumos' CC [M] /media/sd/Downloads/exfat-nofuse/exfat_core.o CC [M] /media/sd/Downloads/exfat-nofuse/exfat_super.o /media/sd/Downloads/exfat-nofuse/exfat_super.c: In function ‘exfat_create’: /media/sd/Downloads/exfat-nofuse/exfat_super.c:751:47: error: implicit declaration of function ‘current_time’ [-Werror=implicit-function-declaration] dir->i_ctime = dir->i_mtime = dir->i_atime = current_time(dir); ^ /media/sd/Downloads/exfat-nofuse/exfat_super.c:751:45: error: incompatible types when assigning to type ‘struct timespec’ from type ‘int’ dir->i_ctime = dir->i_mtime = dir->i_atime = current_time(dir); ^ /media/sd/Downloads/exfat-nofuse/exfat_super.c:765:51: error: incompatible types when assigning to type ‘struct timespec’ from type ‘int’ inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode); ^ /media/sd/Downloads/exfat-nofuse/exfat_super.c: In function ‘exfat_unlink’: /media/sd/Downloads/exfat-nofuse/exfat_super.c:900:30: error: incompatible types when assigning to type ‘struct timespec’ from type ‘int’ dir->i_mtime = dir->i_atime = current_time(dir); ^ /media/sd/Downloads/exfat-nofuse/exfat_super.c:907:34: error: incompatible types when assigning to type ‘struct timespec’ from type ‘int’ inode->i_mtime = inode->i_atime = current_time(inode); ^ /media/sd/Downloads/exfat-nofuse/exfat_super.c: In function ‘exfat_symlink’: /media/sd/Downloads/exfat-nofuse/exfat_super.c:957:45: error: incompatible types when assigning to type ‘struct timespec’ from type ‘int’ dir->i_ctime = dir->i_mtime = dir->i_atime = current_time(dir); ^ /media/sd/Downloads/exfat-nofuse/exfat_super.c:971:51: error: incompatible types when assigning to type ‘struct timespec’ from type ‘int’ inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode); ^ /media/sd/Downloads/exfat-nofuse/exfat_super.c: In function ‘exfat_mkdir’: /media/sd/Downloads/exfat-nofuse/exfat_super.c:1021:45: error: incompatible types when assigning to type ‘struct timespec’ from type ‘int’ dir->i_ctime = dir->i_mtime = dir->i_atime = current_time(dir); ^ /media/sd/Downloads/exfat-nofuse/exfat_super.c:1036:51: error: incompatible types when assigning to type ‘struct timespec’ from type ‘int’ inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode); ^ /media/sd/Downloads/exfat-nofuse/exfat_super.c: In function ‘exfat_rmdir’: /media/sd/Downloads/exfat-nofuse/exfat_super.c:1075:30: error: incompatible types when assigning to type ‘struct timespec’ from type ‘int’ dir->i_mtime = dir->i_atime = current_time(dir); ^ /media/sd/Downloads/exfat-nofuse/exfat_super.c:1083:34: error: incompatible types when assigning to type ‘struct timespec’ from type ‘int’ inode->i_mtime = inode->i_atime = current_time(inode); ^ /media/sd/Downloads/exfat-nofuse/exfat_super.c: In function ‘exfat_rename’: /media/sd/Downloads/exfat-nofuse/exfat_super.c:1138:57: error: incompatible types when assigning to type ‘struct timespec’ from type ‘int’ new_dir->i_ctime = new_dir->i_mtime = new_dir->i_atime = current_time(new_dir); ^ /media/sd/Downloads/exfat-nofuse/exfat_super.c:1161:38: error: incompatible types when assigning to type ‘struct timespec’ from type ‘int’ old_dir->i_ctime = old_dir->i_mtime = current_time(old_dir); ^ /media/sd/Downloads/exfat-nofuse/exfat_super.c:1172:22: error: incompatible types when assigning to type ‘struct timespec’ from type ‘int’ new_inode->i_ctime = current_time(new_inode); ^ /media/sd/Downloads/exfat-nofuse/exfat_super.c: In function ‘exfat_cont_expand’: /media/sd/Downloads/exfat-nofuse/exfat_super.c:1191:34: error: incompatible types when assigning to type ‘struct timespec’ from type ‘int’ inode->i_ctime = inode->i_mtime = current_time(inode); ^ /media/sd/Downloads/exfat-nofuse/exfat_super.c: In function ‘_exfat_truncate’: /media/sd/Downloads/exfat-nofuse/exfat_super.c:1485:34: error: incompatible types when assigning to type ‘struct timespec’ from type ‘int’ inode->i_ctime = inode->i_mtime = current_time(inode); ^ /media/sd/Downloads/exfat-nofuse/exfat_super.c: In function ‘exfat_write_end’: /media/sd/Downloads/exfat-nofuse/exfat_super.c:1681:35: error: incompatible types when assigning to type ‘struct timespec’ from type ‘int’ inode->i_mtime = inode->i_ctime = current_time(inode); ^ /media/sd/Downloads/exfat-nofuse/exfat_super.c: In function ‘exfat_read_root’: /media/sd/Downloads/exfat-nofuse/exfat_super.c:2438:51: error: incompatible types when assigning to type ‘struct timespec’ from type ‘int’ inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode); ^ cc1: some warnings being treated as errors scripts/Makefile.build:289: recipe for target '/media/sd/Downloads/exfat-nofuse/exfat_super.o' failed make[2]: [/media/sd/Downloads/exfat-nofuse/exfat_super.o] Error 1 Makefile:1473: recipe for target 'module/media/sd/Downloads/exfat-nofuse' failed make[1]: [module/media/sd/Downloads/exfat-nofuse] Error 2 make[1]: Leaving directory '/usr/src/linux-headers-4.8.17-galliumos' Makefile:35: recipe for target 'all' failed make: *** [all] Error 2

YorkTsai2012 commented 6 years ago

Maybe CURRENT_TIME or current_kernel_time() can meet the requirement.