Skip to content

Commit ca3621f

Browse files
Add missing items in FreeBSD
1 parent 094464b commit ca3621f

File tree

1 file changed

+40
-0
lines changed
  • src/unix/bsd/freebsdlike/freebsd

1 file changed

+40
-0
lines changed

src/unix/bsd/freebsdlike/freebsd/mod.rs

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ pub type sctp_assoc_t = u32;
5050

5151
pub type eventfd_t = u64;
5252

53+
pub type seqc_t = u32;
54+
5355
#[cfg_attr(feature = "extra_traits", derive(Debug, Hash, PartialEq, Eq))]
5456
#[repr(u32)]
5557
pub enum devstat_support_flags {
@@ -1355,6 +1357,44 @@ s! {
13551357
pub strchange_instrms: u16,
13561358
pub strchange_outstrms: u16,
13571359
}
1360+
1361+
pub struct filedesc {
1362+
pub fd_files: *mut fdescenttbl,
1363+
pub fd_map: *mut c_ulong,
1364+
pub fd_freefile: c_int,
1365+
pub fd_refcnt: c_int,
1366+
pub fd_holdcnt: c_int,
1367+
fd_sx: sx,
1368+
fd_kqlist: kqlist,
1369+
pub fd_holdleaderscount: c_int,
1370+
pub fd_holdleaderswakeup: c_int,
1371+
}
1372+
1373+
pub struct fdescenttbl {
1374+
pub fdt_nfiles: c_int,
1375+
fdt_ofiles: [*mut c_void; 0],
1376+
}
1377+
1378+
#[doc(hidden)]
1379+
pub struct sx {
1380+
lock_object: lock_object,
1381+
sx_lock: crate::uintptr_t,
1382+
}
1383+
1384+
#[doc(hidden)]
1385+
pub struct lock_object {
1386+
lo_name: *const c_char,
1387+
lo_flags: c_uint,
1388+
lo_data: c_uint,
1389+
// This is normally `struct witness`.
1390+
lo_witness: *mut c_void,
1391+
}
1392+
1393+
#[doc(hidden)]
1394+
pub struct kqlist {
1395+
tqh_first: *mut c_void,
1396+
tqh_last: *mut *mut c_void,
1397+
}
13581398
}
13591399

13601400
s_no_extra_traits! {

0 commit comments

Comments
 (0)