qemu: Fix statfs flag.

Compile-tested the right package this time...

+14 -17
+14 -17
pkgs/applications/virtualization/qemu/statfs-flags.patch
··· 1 - commit d3282d2512774dc5027c98930a3852b2b6e8407a 1 + commit 909fe47c7009aa9a75fe9470c5f8d3dd5b50917a 2 2 Author: Shea Levy <shea@shealevy.com> 3 3 Date: Sun Feb 18 13:50:11 2018 -0500 4 4 ··· 59 59 unlock_user_struct(target_stfs, arg2, 1); 60 60 } 61 61 diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h 62 - index a35c52a60a..9f90451caf 100644 62 + index a35c52a60a..64aa49d3c5 100644 63 63 --- a/linux-user/syscall_defs.h 64 64 +++ b/linux-user/syscall_defs.h 65 65 @@ -362,7 +362,14 @@ struct kernel_statfs { ··· 77 77 }; 78 78 79 79 struct target_dirent { 80 - @@ -2223,7 +2230,13 @@ struct target_statfs { 80 + @@ -2223,7 +2230,12 @@ struct target_statfs { 81 81 /* Linux specials */ 82 82 target_fsid_t f_fsid; 83 83 int32_t f_namelen; 84 84 +#ifdef HAVE_STATFS_FLAGS 85 - + int32_t f_frsize; 86 85 + int32_t f_flags; 87 - + int32_t f_spare[4]; 86 + + int32_t f_spare[5]; 88 87 +#else 89 88 int32_t f_spare[6]; 90 89 +#endif 91 90 }; 92 91 #else 93 92 struct target_statfs { 94 - @@ -2239,7 +2252,13 @@ struct target_statfs { 93 + @@ -2239,7 +2251,12 @@ struct target_statfs { 95 94 /* Linux specials */ 96 95 target_fsid_t f_fsid; 97 96 abi_long f_namelen; 98 97 +#ifdef HAVE_STATFS_FLAGS 99 - + abi_long f_frsize; 100 98 + abi_long f_flags; 101 - + abi_long f_spare[4]; 99 + + abi_long f_spare[5]; 102 100 +#else 103 101 abi_long f_spare[6]; 104 102 +#endif 105 103 }; 106 104 #endif 107 105 108 - @@ -2255,7 +2274,13 @@ struct target_statfs64 { 106 + @@ -2255,7 +2272,12 @@ struct target_statfs64 { 109 107 uint64_t f_bavail; 110 108 target_fsid_t f_fsid; 111 109 uint32_t f_namelen; 112 110 +#ifdef HAVE_STATFS_FLAGS 113 - + uint32_t f_frsize; 114 111 + uint32_t f_flags; 115 - + uint32_t f_spare[4]; 112 + + uint32_t f_spare[5]; 116 113 +#else 117 114 uint32_t f_spare[6]; 118 115 +#endif 119 116 }; 120 117 #elif (defined(TARGET_PPC64) || defined(TARGET_X86_64) || \ 121 118 defined(TARGET_SPARC64) || defined(TARGET_AARCH64)) && \ 122 - @@ -2271,7 +2296,12 @@ struct target_statfs { 119 + @@ -2271,7 +2293,12 @@ struct target_statfs { 123 120 target_fsid_t f_fsid; 124 121 abi_long f_namelen; 125 122 abi_long f_frsize; ··· 132 129 }; 133 130 134 131 struct target_statfs64 { 135 - @@ -2285,7 +2315,12 @@ struct target_statfs64 { 132 + @@ -2285,7 +2312,12 @@ struct target_statfs64 { 136 133 target_fsid_t f_fsid; 137 134 abi_long f_namelen; 138 135 abi_long f_frsize; ··· 145 142 }; 146 143 #elif defined(TARGET_S390X) 147 144 struct target_statfs { 148 - @@ -2299,7 +2334,13 @@ struct target_statfs { 145 + @@ -2299,7 +2331,13 @@ struct target_statfs { 149 146 kernel_fsid_t f_fsid; 150 147 int32_t f_namelen; 151 148 int32_t f_frsize; ··· 159 156 }; 160 157 161 158 struct target_statfs64 { 162 - @@ -2313,7 +2354,12 @@ struct target_statfs64 { 159 + @@ -2313,7 +2351,12 @@ struct target_statfs64 { 163 160 kernel_fsid_t f_fsid; 164 161 int32_t f_namelen; 165 162 int32_t f_frsize; ··· 172 169 }; 173 170 #else 174 171 struct target_statfs { 175 - @@ -2327,7 +2373,12 @@ struct target_statfs { 172 + @@ -2327,7 +2370,12 @@ struct target_statfs { 176 173 target_fsid_t f_fsid; 177 174 uint32_t f_namelen; 178 175 uint32_t f_frsize; ··· 185 182 }; 186 183 187 184 struct target_statfs64 { 188 - @@ -2341,7 +2392,12 @@ struct target_statfs64 { 185 + @@ -2341,7 +2389,12 @@ struct target_statfs64 { 189 186 target_fsid_t f_fsid; 190 187 uint32_t f_namelen; 191 188 uint32_t f_frsize;