Skip to content

Commit 922768d

Browse files
committed
Add missing consts for Solaris/Illumos
1 parent 1f3c205 commit 922768d

File tree

1 file changed

+41
-1
lines changed

1 file changed

+41
-1
lines changed

src/unix/solaris/mod.rs

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,16 @@ s! {
308308
pub sem_pad1: [u64; 3],
309309
pub sem_pad2: [u64; 2]
310310
}
311+
312+
pub struct flock {
313+
pub l_type: ::c_short,
314+
pub l_whence: ::c_short,
315+
pub l_start: ::off_t,
316+
pub l_len: ::off_t,
317+
pub l_sysid: ::c_int,
318+
pub l_pid: ::pid_t,
319+
pub l_pad: [::c_long; 4]
320+
}
311321
}
312322

313323
pub const LC_CTYPE: ::c_int = 0;
@@ -396,6 +406,8 @@ pub const NOEXPR: ::nl_item = 57;
396406
pub const _DATE_FMT: ::nl_item = 58;
397407
pub const MAXSTRMSG: ::nl_item = 58;
398408

409+
pub const PATH_MAX: ::c_int = 1024;
410+
399411
pub const SA_ONSTACK: ::c_int = 0x00000001;
400412
pub const SA_RESETHAND: ::c_int = 0x00000002;
401413
pub const SA_RESTART: ::c_int = 0x00000004;
@@ -411,6 +423,8 @@ pub const FIONBIO: ::c_int = 0x8004667e;
411423

412424
pub const SIGCHLD: ::c_int = 18;
413425
pub const SIGBUS: ::c_int = 10;
426+
pub const SIG_BLOCK: ::c_int = 1;
427+
pub const SIG_UNBLOCK: ::c_int = 2;
414428
pub const SIG_SETMASK: ::c_int = 3;
415429

416430
pub const IPV6_MULTICAST_LOOP: ::c_int = 0x8;
@@ -484,6 +498,9 @@ pub const F_TEST: ::c_int = 3;
484498
pub const F_TLOCK: ::c_int = 2;
485499
pub const F_ULOCK: ::c_int = 0;
486500
pub const F_DUPFD_CLOEXEC: ::c_int = 37;
501+
pub const F_SETLK: ::c_int = 6;
502+
pub const F_SETLKW: ::c_int = 7;
503+
pub const F_GETLK: ::c_int = 14;
487504
pub const SIGHUP: ::c_int = 1;
488505
pub const SIGINT: ::c_int = 2;
489506
pub const SIGQUIT: ::c_int = 3;
@@ -492,9 +509,26 @@ pub const SIGABRT: ::c_int = 6;
492509
pub const SIGFPE: ::c_int = 8;
493510
pub const SIGKILL: ::c_int = 9;
494511
pub const SIGSEGV: ::c_int = 11;
512+
pub const SIGSYS: ::c_int = 12;
495513
pub const SIGPIPE: ::c_int = 13;
496514
pub const SIGALRM: ::c_int = 14;
497515
pub const SIGTERM: ::c_int = 15;
516+
pub const SIGUSR1: ::c_int = 16;
517+
pub const SIGUSR2: ::c_int = 17;
518+
pub const SIGPWR: ::c_int = 19;
519+
pub const SIGWINCH: ::c_int = 20;
520+
pub const SIGURG: ::c_int = 21;
521+
pub const SIGPOLL: ::c_int = 22;
522+
pub const SIGIO: ::c_int = SIGPOLL;
523+
pub const SIGSTOP: ::c_int = 23;
524+
pub const SIGTSTP: ::c_int = 24;
525+
pub const SIGCONT: ::c_int = 25;
526+
pub const SIGTTIN: ::c_int = 26;
527+
pub const SIGTTOU: ::c_int = 27;
528+
pub const SIGVTALRM: ::c_int = 28;
529+
pub const SIGPROF: ::c_int = 29;
530+
pub const SIGXCPU: ::c_int = 30;
531+
pub const SIGXFSZ: ::c_int = 31;
498532

499533
pub const WNOHANG: ::c_int = 0x40;
500534

@@ -506,8 +540,12 @@ pub const PROT_EXEC: ::c_int = 4;
506540
pub const MAP_SHARED: ::c_int = 0x0001;
507541
pub const MAP_PRIVATE: ::c_int = 0x0002;
508542
pub const MAP_FIXED: ::c_int = 0x0010;
543+
pub const MAP_NORESERVE: ::c_int = 0x40;
509544
pub const MAP_ANON: ::c_int = 0x0100;
510-
545+
pub const MAP_RENAME: ::c_int = 0x20;
546+
pub const MAP_ALIGN: ::c_int = 0x200;
547+
pub const MAP_TEXT: ::c_int = 0x400;
548+
pub const MAP_INITDATA: ::c_int = 0x800;
511549
pub const MAP_FAILED: *mut ::c_void = !0 as *mut ::c_void;
512550

513551
pub const MCL_CURRENT: ::c_int = 0x0001;
@@ -516,6 +554,7 @@ pub const MCL_FUTURE: ::c_int = 0x0002;
516554
pub const MS_SYNC: ::c_int = 0x0004;
517555
pub const MS_ASYNC: ::c_int = 0x0001;
518556
pub const MS_INVALIDATE: ::c_int = 0x0002;
557+
pub const MS_INVALCURPROC: ::c_int = 0x0008;
519558

520559
pub const EPERM: ::c_int = 1;
521560
pub const ENOENT: ::c_int = 2;
@@ -949,5 +988,6 @@ extern {
949988
flags: ::c_int) -> ::c_int;
950989
pub fn mkfifoat(dirfd: ::c_int, pathname: *const ::c_char,
951990
mode: ::mode_t) -> ::c_int;
991+
pub fn sethostname(name: *const ::c_char, len: ::size_t) -> ::c_int;
952992
}
953993

0 commit comments

Comments
 (0)