about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/virtualization/virtualbox/guest-additions/strlcpy-2.patch
blob: 15e546f89e79c38bc4343bdd05947040ac62f857 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# https://www.virtualbox.org/changeset/102990/vbox
--- a/src/VBox/Additions/common/VBoxGuest/VBoxGuest-linux.c
+++ b/src/VBox/Additions/common/VBoxGuest/VBoxGuest-linux.c
@@ -1411,5 +1411,5 @@
     }
     else if (pParam->name[0] != 'd')
-        strlcpy(&g_szLogGrp[0], pszValue, sizeof(g_szLogGrp));
+        RT_STRSCPY(&g_szLogGrp[0], pszValue, sizeof(g_szLogGrp));
 
     return 0;
@@ -1437,5 +1437,5 @@
     }
     else if (pParam->name[0] != 'd')
-        strlcpy(&g_szLogFlags[0], pszValue, sizeof(g_szLogFlags));
+        RT_STRSCPY(&g_szLogFlags[0], pszValue, sizeof(g_szLogFlags));
     return 0;
 }
@@ -1462,5 +1462,5 @@
     }
     else if (pParam->name[0] != 'd')
-        strlcpy(&g_szLogDst[0], pszValue, sizeof(g_szLogDst));
+        RT_STRSCPY(&g_szLogDst[0], pszValue, sizeof(g_szLogDst));
     return 0;
 }

# https://www.virtualbox.org/changeset/102990/vbox
--- a/src/VBox/Additions/linux/drm/vbox_drv.h
+++ b/src/VBox/Additions/linux/drm/vbox_drv.h
@@ -539,7 +539,5 @@
 void vbox_irq_fini(struct vbox_private *vbox);
 void vbox_report_hotplug(struct vbox_private *vbox);
-#if RTLNX_VER_MAX(5,15,0) && !RTLNX_RHEL_MAJ_PREREQ(9,1) && !RTLNX_SUSE_MAJ_PREREQ(15,5)
 irqreturn_t vbox_irq_handler(int irq, void *arg);
-#endif
 
 /* vbox_hgsmi.c */

# https://www.virtualbox.org/changeset/102990/vbox
--- a/src/VBox/Additions/linux/sharedfolders/regops.c
+++ b/src/VBox/Additions/linux/sharedfolders/regops.c
@@ -3506,5 +3506,5 @@
 
 /** file_operations::mmap wrapper for logging purposes. */
-extern int vbsf_reg_mmap(struct file *file, struct vm_area_struct *vma)
+static int vbsf_reg_mmap(struct file *file, struct vm_area_struct *vma)
 {
     int rc;
@@ -3787,5 +3787,5 @@
 
 # if RTLNX_VER_MIN(5,19,0) || RTLNX_RHEL_RANGE(9,3, 9,99)
-int vbsf_write_begin(struct file *file, struct address_space *mapping, loff_t pos,
+static int vbsf_write_begin(struct file *file, struct address_space *mapping, loff_t pos,
                      unsigned len, struct page **pagep, void **fsdata)
 {
@@ -3794,5 +3794,5 @@
 }
 # else
-int vbsf_write_begin(struct file *file, struct address_space *mapping, loff_t pos,
+static int vbsf_write_begin(struct file *file, struct address_space *mapping, loff_t pos,
                      unsigned len, unsigned flags, struct page **pagep, void **fsdata)
 {

# https://www.virtualbox.org/changeset/102990/vbox
--- a/src/VBox/Additions/linux/sharedfolders/vfsmod.c
+++ b/src/VBox/Additions/linux/sharedfolders/vfsmod.c
@@ -1409,5 +1409,5 @@
     case Opt_iocharset:
     case Opt_nls:
-        strlcpy(info->nls_name, param->string, sizeof(info->nls_name));
+        RT_STRSCPY(info->nls_name, param->string, sizeof(info->nls_name));
         break;
     case Opt_uid:
@@ -1470,5 +1470,5 @@
         break;
     case Opt_tag:
-        strlcpy(info->szTag, param->string, sizeof(info->szTag));
+        RT_STRSCPY(info->szTag, param->string, sizeof(info->szTag));
         break;
     default:
@@ -1529,5 +1529,5 @@
 
     /* fc->source (the shared folder name) is set after vbsf_init_fs_ctx() */
-    strlcpy(info->name, fc->source, sizeof(info->name));
+    RT_STRSCPY(info->name, fc->source, sizeof(info->name));
 
 # if RTLNX_VER_MAX(5,3,0)