@@ -177,9 +177,6 @@ cfg_if! {
177
177
178
178
pub const PTRACE_DETACH : c_uint = 11 ;
179
179
180
- pub const F_SETLK : c_int = 8 ;
181
- pub const F_SETLKW : c_int = 9 ;
182
-
183
180
pub const F_RDLCK : c_int = 1 ;
184
181
pub const F_WRLCK : c_int = 2 ;
185
182
pub const F_UNLCK : c_int = 3 ;
@@ -223,9 +220,6 @@ cfg_if! {
223
220
224
221
pub const PTRACE_DETACH : c_uint = 17 ;
225
222
226
- pub const F_SETLK : c_int = 6 ;
227
- pub const F_SETLKW : c_int = 7 ;
228
-
229
223
pub const F_RDLCK : c_int = 0 ;
230
224
pub const F_WRLCK : c_int = 1 ;
231
225
pub const F_UNLCK : c_int = 2 ;
@@ -261,6 +255,24 @@ cfg_if! {
261
255
pub const EFD_CLOEXEC : c_int = 0x80000 ;
262
256
}
263
257
}
258
+ cfg_if ! {
259
+ if #[ cfg( target_arch = "sparc" ) ] {
260
+ pub const F_SETLK : c_int = 8 ;
261
+ pub const F_SETLKW : c_int = 9 ;
262
+ } else if #[ cfg( all(
263
+ gnu_file_offset_bits64,
264
+ any( target_arch = "mips" , target_arch = "mips32r6" )
265
+ ) ) ] {
266
+ pub const F_SETLK : c_int = 34 ;
267
+ pub const F_SETLKW : c_int = 35 ;
268
+ } else if #[ cfg( gnu_file_offset_bits64) ] {
269
+ pub const F_SETLK : c_int = 13 ;
270
+ pub const F_SETLKW : c_int = 14 ;
271
+ } else {
272
+ pub const F_SETLK : c_int = 6 ;
273
+ pub const F_SETLKW : c_int = 7 ;
274
+ }
275
+ }
264
276
265
277
#[ cfg( target_endian = "little" ) ]
266
278
pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP : crate :: pthread_mutex_t = pthread_mutex_t {
0 commit comments