wok diff virtualbox-ose/stuff/virtualbox-linux.patch @ rev 22408
Add knot-dns (again)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Tue Dec 10 17:03:15 2019 +0100 (2019-12-10) |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/virtualbox-ose/stuff/virtualbox-linux.patch Tue Dec 10 17:03:15 2019 +0100 1.3 @@ -0,0 +1,204 @@ 1.4 +--- virtualbox-ose-4.2.6/src/VBox/Additions/linux/sharedfolders/dirops.c 1.5 ++++ virtualbox-ose-4.2.6/src/VBox/Additions/linux/sharedfolders/dirops.c 1.6 +@@ -233,7 +233,11 @@ 1.7 + * b. failure to compute fake inode number 1.8 + * c. filldir returns an error (see comment on that) 1.9 + */ 1.10 ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0) 1.11 ++static int sf_dir_iterate (struct file *dir, struct dir_context *ctx) 1.12 ++#else 1.13 + static int sf_dir_read (struct file *dir, void *opaque, filldir_t filldir) 1.14 ++#endif 1.15 + { 1.16 + TRACE(); 1.17 + for (;;) 1.18 +@@ -257,12 +261,19 @@ 1.19 + /* skip erroneous entry and proceed */ 1.20 + LogFunc(("sf_getdent error %d\n", err)); 1.21 + dir->f_pos += 1; 1.22 ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0) 1.23 ++ ctx->pos += 1; 1.24 ++#endif 1.25 + continue; 1.26 + } 1.27 + 1.28 + /* d_name now contains a valid entry name */ 1.29 + 1.30 ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0) 1.31 ++ sanity = ctx->pos + 0xbeef; 1.32 ++#else 1.33 + sanity = dir->f_pos + 0xbeef; 1.34 ++#endif 1.35 + fake_ino = sanity; 1.36 + if (sanity - fake_ino) 1.37 + { 1.38 +@@ -270,8 +281,12 @@ 1.39 + return -EINVAL; 1.40 + } 1.41 + 1.42 ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0) 1.43 ++ err = dir_emit(ctx, d_name, strlen(d_name), fake_ino, DT_UNKNOWN); 1.44 ++#else 1.45 + err = filldir(opaque, d_name, strlen(d_name), 1.46 + dir->f_pos, fake_ino, DT_UNKNOWN); 1.47 ++#endif 1.48 + if (err) 1.49 + { 1.50 + LogFunc(("filldir returned error %d\n", err)); 1.51 +@@ -281,6 +296,9 @@ 1.52 + } 1.53 + 1.54 + dir->f_pos += 1; 1.55 ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0) 1.56 ++ ctx->pos += 1; 1.57 ++#endif 1.58 + } 1.59 + 1.60 + BUG(); 1.61 +@@ -289,7 +307,11 @@ 1.62 + struct file_operations sf_dir_fops = 1.63 + { 1.64 + .open = sf_dir_open, 1.65 ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0) 1.66 ++ .iterate = sf_dir_iterate, 1.67 ++#else 1.68 + .readdir = sf_dir_read, 1.69 ++#endif 1.70 + .release = sf_dir_release, 1.71 + .read = generic_read_dir 1.72 + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37) 1.73 +--- virtualbox-ose-4.2.6/src/VBox/Additions/linux/drm/vboxvideo_drv.c 1.74 ++++ virtualbox-ose-4.2.6/src/VBox/Additions/linux/drm/vboxvideo_drv.c 1.75 +@@ -88,7 +88,6 @@ 1.76 + #endif 1.77 + .mmap = drm_mmap, 1.78 + .poll = drm_poll, 1.79 +- .fasync = drm_fasync, 1.80 + }, 1.81 + #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39) 1.82 + .pci_driver = 1.83 +--- virtualbox-ose-4.2.6/src/VBox/Additions/linux/drm/vboxvideo_drm.c 1.84 ++++ virtualbox-ose-4.2.6/src/VBox/Additions/linux/drm/vboxvideo_drm.c 1.85 +@@ -98,7 +98,6 @@ 1.86 + .unlocked_ioctl = drm_ioctl, 1.87 + .mmap = drm_mmap, 1.88 + .poll = drm_poll, 1.89 +- .fasync = drm_fasync, 1.90 + }; 1.91 + #endif 1.92 + 1.93 +@@ -129,7 +128,6 @@ 1.94 + #endif 1.95 + .mmap = drm_mmap, 1.96 + .poll = drm_poll, 1.97 +- .fasync = drm_fasync, 1.98 + }, 1.99 + #else /* LINUX_VERSION_CODE >= KERNEL_VERSION(3, 3, 0) || defined(DRM_RHEL63) */ 1.100 + .fops = &driver_fops, 1.101 +--- virtualbox-ose-4.2.6/src/VBox/Additions/linux/sharedfolders/utils.c 1.102 ++++ virtualbox-ose-4.2.6/src/VBox/Additions/linux/sharedfolders/utils.c 1.103 +@@ -144,8 +144,13 @@ 1.104 + #endif 1.105 + } 1.106 + 1.107 ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 11, 0) 1.108 + inode->i_uid = sf_g->uid; 1.109 + inode->i_gid = sf_g->gid; 1.110 ++#else 1.111 ++ inode->i_uid.val = sf_g->uid; 1.112 ++ inode->i_gid.val = sf_g->gid; 1.113 ++#endif 1.114 + inode->i_size = info->cbObject; 1.115 + #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19) && !defined(KERNEL_FC6) 1.116 + inode->i_blksize = 4096; 1.117 +--- virtualBbx-ose-4.2.6/src/VBox/Additions/common/VBoxGuest/VBoxGuest-linux.c 1.118 ++++ virtualbox-ose-4.2.6/src/VBox/Additions/common/VBoxGuest/VBoxGuest-linux.c 1.119 +@@ -196,7 +196,7 @@ 1.120 + 1.121 + 1.122 + /** PCI hotplug structure. */ 1.123 +-static const struct pci_device_id __devinitdata g_VBoxGuestPciId[] = 1.124 ++static const struct pci_device_id g_VBoxGuestPciId[] = 1.125 + { 1.126 + { 1.127 + vendor: VMMDEV_VENDORID, 1.128 +--- virtualbox-ose-4.2.6/src/VBox/Additions/linux/sharedfolders/regops.c 1.129 ++++ virtualbox-ose-4.2.6/src/VBox/Additions/linux/sharedfolders/regops.c 1.130 +@@ -574,8 +574,13 @@ 1.131 + # else 1.132 + .sendfile = generic_file_sendfile, 1.133 + # endif 1.134 ++# if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0) 1.135 ++ .read_iter = generic_file_read_iter, 1.136 ++ .write_iter = generic_file_write_iter, 1.137 ++# else 1.138 + .aio_read = generic_file_aio_read, 1.139 + .aio_write = generic_file_aio_write, 1.140 ++# endif 1.141 + # if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35) 1.142 + .fsync = noop_fsync, 1.143 + # else 1.144 +--- virtualbox-ose-4.2.6/src/VBox/HostDrivers/VBoxPci/linux/VBoxPci-linux.c 1.145 ++++ virtualbox-ose-4.2.6/src/VBox/HostDrivers/VBoxPci/linux/VBoxPci-linux.c 1.146 +@@ -429,7 +429,11 @@ 1.147 + if (!pNewCreds) 1.148 + goto done; 1.149 + 1.150 ++# if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0) 1.151 ++ pNewCreds->fsuid.val = 0; 1.152 ++# else 1.153 + pNewCreds->fsuid = 0; 1.154 ++# endif 1.155 + pOldCreds = override_creds(pNewCreds); 1.156 + #endif 1.157 + 1.158 +@@ -539,7 +543,11 @@ 1.159 + if (!pNewCreds) 1.160 + goto done; 1.161 + 1.162 ++# if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0) 1.163 ++ pNewCreds->fsuid.val = 0; 1.164 ++# else 1.165 + pNewCreds->fsuid = 0; 1.166 ++# endif 1.167 + pOldCreds = override_creds(pNewCreds); 1.168 + #endif 1.169 + RTStrPrintf(szFileBuf, cMaxBuf, 1.170 +--- virtualbox-ose-4.2.6/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c 1.171 ++++ virtualbox-ose-4.2.6/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c 1.172 +@@ -223,7 +223,11 @@ 1.173 + DECLINLINE(RTUID) vboxdrvLinuxUid(void) 1.174 + { 1.175 + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29) 1.176 ++# if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0) 1.177 ++ return current->cred->uid.val; 1.178 ++# else 1.179 + return current->cred->uid; 1.180 ++# endif 1.181 + #else 1.182 + return current->uid; 1.183 + #endif 1.184 +@@ -232,7 +236,11 @@ 1.185 + DECLINLINE(RTGID) vboxdrvLinuxGid(void) 1.186 + { 1.187 + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29) 1.188 ++# if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0) 1.189 ++ return current->cred->gid.val; 1.190 ++# else 1.191 + return current->cred->gid; 1.192 ++# endif 1.193 + #else 1.194 + return current->gid; 1.195 + #endif 1.196 +@@ -241,7 +249,11 @@ 1.197 + DECLINLINE(RTUID) vboxdrvLinuxEuid(void) 1.198 + { 1.199 + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29) 1.200 ++# if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0) 1.201 ++ return current->cred->euid.val; 1.202 ++# else 1.203 + return current->cred->euid; 1.204 ++# endif 1.205 + #else 1.206 + return current->euid; 1.207 + #endif