1#![allow(non_camel_case_types)]
2
3use std::ffi::{c_char, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort};
4
5pub type umode_t = c_ushort;
15pub type nlink_t = u32;
16pub type off_t = c_long;
17pub type uid_t = c_uint;
25pub type gid_t = c_uint;
26pub type uintptr_t = c_ulong;
30pub type intptr_t = c_long;
31
32pub type size_t = c_ulong;
33pub type pid_t = c_int;
34
35pub type ssize_t = c_long;
36
37pub type u_char = c_uchar;
38pub type u_short = c_ushort;
39pub type u_int = c_uint;
40pub type u_long = c_ulong;
41pub type sa_family_t = c_ushort;
42
43
44#[repr(C)]
45#[derive(Debug)]
46pub struct sockaddr {
47 pub sa_family: sa_family_t, sa_data_min: [c_char; 14], }
50
51
52#[repr(C)]
53#[derive(Debug)]
54pub struct Stat {
55 pub st_dev: c_uint,
56 pub st_ino: c_uint,
57 pub st_mode: c_uint,
58 pub st_nlink: c_uint,
59 pub st_uid: c_uint,
60 pub st_gid: c_uint,
61 pub st_rdev: c_uint,
62 pub st_size: c_long,
63 pub st_atime: c_ulong,
64 pub st_mtime: c_ulong,
65 pub st_ctime: c_ulong,
66 pub st_blksize: c_uint,
67 pub st_blocks: c_uint,
68 pub st_flags: c_uint,
69 pub st_gen: c_uint,
70}
71
72#[repr(C)]
73#[derive(Debug)]
74pub struct Pollfd {
75 pub fd: c_int,
76 pub events: c_short,
77 pub revents: c_short,
78}