Skip to content

Commit c70634e

Browse files
committed
Add flock64 to linux_like platforms
1 parent 53bdffc commit c70634e

File tree

12 files changed

+93
-0
lines changed

12 files changed

+93
-0
lines changed

src/unix/linux_like/android/mod.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ pub type ino_t = ::c_ulong;
2222
pub type __CPU_BITTYPE = ::c_ulong;
2323
pub type idtype_t = ::c_int;
2424
pub type loff_t = ::c_longlong;
25+
pub type __kernel_loff_t = ::c_longlong;
26+
pub type __kernel_pid_t = ::c_int;
2527

2628
s! {
2729
pub struct stack_t {
@@ -78,6 +80,14 @@ s! {
7880
pub l_pid: ::pid_t,
7981
}
8082

83+
pub struct flock64 {
84+
pub l_type: ::c_short,
85+
pub l_whence: ::c_short,
86+
pub l_start: ::__kernel_loff_t,
87+
pub l_len: ::__kernel_loff_t,
88+
pub l_pid: ::__kernel_pid_t,
89+
}
90+
8191
pub struct cpu_set_t {
8292
#[cfg(target_pointer_width = "64")]
8393
__bits: [__CPU_BITTYPE; 16],

src/unix/linux_like/emscripten/mod.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,14 @@ s! {
223223
pub l_pid: ::pid_t,
224224
}
225225

226+
pub struct flock64 {
227+
pub l_type: ::c_short,
228+
pub l_whence: ::c_short,
229+
pub l_start: ::off64_t,
230+
pub l_len: ::off64_t,
231+
pub l_pid: ::pid_t,
232+
}
233+
226234
pub struct pthread_attr_t {
227235
__size: [u32; 11]
228236
}

src/unix/linux_like/linux/gnu/b32/arm/mod.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,14 @@ s! {
3333
pub l_pid: ::pid_t,
3434
}
3535

36+
pub struct flock64 {
37+
pub l_type: ::c_short,
38+
pub l_whence: ::c_short,
39+
pub l_start: ::off64_t,
40+
pub l_len: ::off64_t,
41+
pub l_pid: ::pid_t,
42+
}
43+
3644
pub struct ipc_perm {
3745
pub __key: ::key_t,
3846
pub uid: ::uid_t,

src/unix/linux_like/linux/gnu/b32/powerpc.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,14 @@ s! {
3333
pub l_pid: ::pid_t,
3434
}
3535

36+
pub struct flock64 {
37+
pub l_type: ::c_short,
38+
pub l_whence: ::c_short,
39+
pub l_start: ::off64_t,
40+
pub l_len: ::off64_t,
41+
pub l_pid: ::pid_t,
42+
}
43+
3644
pub struct ipc_perm {
3745
__key: ::key_t,
3846
pub uid: ::uid_t,

src/unix/linux_like/linux/gnu/b32/x86/mod.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@ s! {
3434
pub l_pid: ::pid_t,
3535
}
3636

37+
pub struct flock64 {
38+
pub l_type: ::c_short,
39+
pub l_whence: ::c_short,
40+
pub l_start: ::off64_t,
41+
pub l_len: ::off64_t,
42+
pub l_pid: ::pid_t,
43+
}
44+
3745
pub struct _libc_fpreg {
3846
pub significand: [u16; 4],
3947
pub exponent: u16,

src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,14 @@ s! {
4545
pub l_pid: ::pid_t,
4646
}
4747

48+
pub struct flock64 {
49+
pub l_type: ::c_short,
50+
pub l_whence: ::c_short,
51+
pub l_start: ::off64_t,
52+
pub l_len: ::off64_t,
53+
pub l_pid: ::pid_t,
54+
}
55+
4856
pub struct stat {
4957
pub st_dev: ::dev_t,
5058
pub st_ino: ::ino_t,

src/unix/linux_like/linux/gnu/b64/mips64/mod.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,14 @@ s! {
5757
pub l_pid: ::pid_t,
5858
}
5959

60+
pub struct flock64 {
61+
pub l_type: ::c_short,
62+
pub l_whence: ::c_short,
63+
pub l_start: ::off64_t,
64+
pub l_len: ::off64_t,
65+
pub l_pid: ::pid_t,
66+
}
67+
6068
pub struct stat64 {
6169
pub st_dev: ::c_ulong,
6270
st_pad1: [::c_long; 2],

src/unix/linux_like/linux/gnu/b64/powerpc64/mod.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,14 @@ s! {
4545
pub l_pid: ::pid_t,
4646
}
4747

48+
pub struct flock64 {
49+
pub l_type: ::c_short,
50+
pub l_whence: ::c_short,
51+
pub l_start: ::off64_t,
52+
pub l_len: ::off64_t,
53+
pub l_pid: ::pid_t,
54+
}
55+
4856
pub struct stat {
4957
pub st_dev: ::dev_t,
5058
pub st_ino: ::ino_t,

src/unix/linux_like/linux/gnu/b64/s390x.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,14 @@ s! {
4444
pub l_pid: ::pid_t,
4545
}
4646

47+
pub struct flock64 {
48+
pub l_type: ::c_short,
49+
pub l_whence: ::c_short,
50+
pub l_start: ::off64_t,
51+
pub l_len: ::off64_t,
52+
pub l_pid: ::pid_t,
53+
}
54+
4755
pub struct siginfo_t {
4856
pub si_signo: ::c_int,
4957
pub si_errno: ::c_int,

src/unix/linux_like/linux/gnu/b64/sparc64/mod.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,15 @@ s! {
6060
pub l_pid: ::pid_t,
6161
}
6262

63+
pub struct flock64 {
64+
pub l_type: ::c_short,
65+
pub l_whence: ::c_short,
66+
pub l_start: ::off64_t,
67+
pub l_len: ::off64_t,
68+
pub l_pid: ::pid_t,
69+
__reserved: ::c_short,
70+
}
71+
6372
pub struct stack_t {
6473
pub ss_sp: *mut ::c_void,
6574
pub ss_flags: ::c_int,

0 commit comments

Comments
 (0)