VirtualBox

Ignore:
Timestamp:
Mar 8, 2017 11:24:53 AM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
113831
Message:

Additions/linux: Linux 4.11 compile fixes

Location:
trunk/src/VBox/Additions/linux/sharedfolders
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/linux/sharedfolders/regops.c

    r65200 r65992  
    445445}
    446446
    447 #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 25)
     447#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
     448static int sf_reg_fault(struct vm_fault *vmf)
     449#elif LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 25)
    448450static int sf_reg_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
    449451#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
     
    460462    uint32_t nread = PAGE_SIZE;
    461463    int err;
     464#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
     465    struct vm_area_struct *vma = vmf->vma;
     466#endif
    462467    struct file *file = vma->vm_file;
    463468    struct inode *inode = GET_F_DENTRY(file)->d_inode;
     
    540545    .fault = sf_reg_fault
    541546#else
    542      .nopage = sf_reg_nopage
     547    .nopage = sf_reg_nopage
    543548#endif
    544549};
  • trunk/src/VBox/Additions/linux/sharedfolders/utils.c

    r62527 r65992  
    291291   [generic_fillattr] */
    292292#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
     293# if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
     294int sf_getattr(const struct path *path, struct kstat *kstat, u32 request_mask, unsigned int flags)
     295# else
    293296int sf_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *kstat)
     297# endif
    294298{
    295299    int err;
     300# if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
     301    struct dentry *dentry = path->dentry;
     302# endif
    296303
    297304    TRACE();
  • trunk/src/VBox/Additions/linux/sharedfolders/vfsmod.h

    r62527 r65992  
    101101extern int  sf_inode_revalidate(struct dentry *dentry);
    102102#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0)
     103# if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
     104extern int  sf_getattr(const struct path *path, struct kstat *kstat,
     105                       u32 request_mask, unsigned int query_flags);
     106# else
    103107extern int  sf_getattr(struct vfsmount *mnt, struct dentry *dentry,
    104108                       struct kstat *kstat);
     109#endif
    105110extern int  sf_setattr(struct dentry *dentry, struct iattr *iattr);
    106111#endif
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette