aboutsummaryrefslogtreecommitdiff
path: root/libc/src/unix/bsd
diff options
context:
space:
mode:
authorDaniel Mueller <deso@posteo.net>2019-01-22 20:16:05 -0800
committerDaniel Mueller <deso@posteo.net>2019-01-22 20:16:05 -0800
commit4fcdf2022df38b37365ee5d948005ac08a1f1a83 (patch)
treec204c0959100390dc708ebdd977bf9daddb356de /libc/src/unix/bsd
parent8b2d8818b26e7084cad240c48fd9ce7fc2519012 (diff)
downloadnitrocli-4fcdf2022df38b37365ee5d948005ac08a1f1a83.tar.gz
nitrocli-4fcdf2022df38b37365ee5d948005ac08a1f1a83.tar.bz2
Update libc crate to 0.2.47
This change updates the libc crate to version 0.2.47. Import subrepo libc/:libc at ce1dfcbf81bd74662b5cd02a9214818a0bfbbffa
Diffstat (limited to 'libc/src/unix/bsd')
-rw-r--r--libc/src/unix/bsd/apple/mod.rs1
-rw-r--r--libc/src/unix/bsd/freebsdlike/dragonfly/mod.rs1
-rw-r--r--libc/src/unix/bsd/freebsdlike/freebsd/mod.rs20
-rw-r--r--libc/src/unix/bsd/netbsdlike/mod.rs1
-rw-r--r--libc/src/unix/bsd/netbsdlike/netbsd/mod.rs14
5 files changed, 37 insertions, 0 deletions
diff --git a/libc/src/unix/bsd/apple/mod.rs b/libc/src/unix/bsd/apple/mod.rs
index 3d9dd94..13da82c 100644
--- a/libc/src/unix/bsd/apple/mod.rs
+++ b/libc/src/unix/bsd/apple/mod.rs
@@ -2659,6 +2659,7 @@ extern {
fd: ::c_int,
newfd: ::c_int,
) -> ::c_int;
+ pub fn uname(buf: *mut ::utsname) -> ::c_int;
}
cfg_if! {
diff --git a/libc/src/unix/bsd/freebsdlike/dragonfly/mod.rs b/libc/src/unix/bsd/freebsdlike/dragonfly/mod.rs
index 0414380..41b6956 100644
--- a/libc/src/unix/bsd/freebsdlike/dragonfly/mod.rs
+++ b/libc/src/unix/bsd/freebsdlike/dragonfly/mod.rs
@@ -801,4 +801,5 @@ extern {
pub fn statfs(path: *const ::c_char, buf: *mut statfs) -> ::c_int;
pub fn fstatfs(fd: ::c_int, buf: *mut statfs) -> ::c_int;
+ pub fn uname(buf: *mut ::utsname) -> ::c_int;
}
diff --git a/libc/src/unix/bsd/freebsdlike/freebsd/mod.rs b/libc/src/unix/bsd/freebsdlike/freebsd/mod.rs
index 03b19eb..878deea 100644
--- a/libc/src/unix/bsd/freebsdlike/freebsd/mod.rs
+++ b/libc/src/unix/bsd/freebsdlike/freebsd/mod.rs
@@ -447,6 +447,19 @@ pub const TIOCSIG: ::c_uint = 0x2004745f;
pub const TIOCM_DCD: ::c_int = 0x40;
pub const H4DISC: ::c_int = 0x7;
+pub const FIONCLEX: ::c_ulong = 0x20006602;
+pub const FIONREAD: ::c_ulong = 0x4004667f;
+pub const FIOASYNC: ::c_ulong = 0x8004667d;
+pub const FIOSETOWN: ::c_ulong = 0x8004667c;
+pub const FIOGETOWN: ::c_ulong = 0x4004667b;
+pub const FIODTYPE: ::c_ulong = 0x4004667a;
+pub const FIOGETLBA: ::c_ulong = 0x40046679;
+pub const FIODGNAME: ::c_ulong = 0x80106678;
+pub const FIONWRITE: ::c_ulong = 0x40046677;
+pub const FIONSPACE: ::c_ulong = 0x40046676;
+pub const FIOSEEKDATA: ::c_ulong = 0xc0086661;
+pub const FIOSEEKHOLE: ::c_ulong = 0xc0086662;
+
pub const JAIL_API_VERSION: u32 = 2;
pub const JAIL_CREATE: ::c_int = 0x01;
pub const JAIL_UPDATE: ::c_int = 0x02;
@@ -949,6 +962,12 @@ pub const UF_READONLY: ::c_ulong = 0x00001000;
pub const UF_HIDDEN: ::c_ulong = 0x00008000;
pub const SF_SNAPSHOT: ::c_ulong = 0x00200000;
+f! {
+ pub fn uname(buf: *mut ::utsname) -> ::c_int {
+ __xuname(256, buf as *mut ::c_void)
+ }
+}
+
extern {
pub fn __error() -> *mut ::c_int;
@@ -1135,6 +1154,7 @@ extern {
pub fn fstatfs(fd: ::c_int, buf: *mut statfs) -> ::c_int;
pub fn dup3(src: ::c_int, dst: ::c_int, flags: ::c_int) -> ::c_int;
+ pub fn __xuname(nmln: ::c_int, buf: *mut ::c_void) -> ::c_int;
}
#[link(name = "util")]
diff --git a/libc/src/unix/bsd/netbsdlike/mod.rs b/libc/src/unix/bsd/netbsdlike/mod.rs
index abd014c..15f84d9 100644
--- a/libc/src/unix/bsd/netbsdlike/mod.rs
+++ b/libc/src/unix/bsd/netbsdlike/mod.rs
@@ -676,6 +676,7 @@ extern {
-> ::c_int;
pub fn getdomainname(name: *mut ::c_char, len: ::size_t) -> ::c_int;
pub fn setdomainname(name: *const ::c_char, len: ::size_t) -> ::c_int;
+ pub fn uname(buf: *mut ::utsname) -> ::c_int;
}
cfg_if! {
diff --git a/libc/src/unix/bsd/netbsdlike/netbsd/mod.rs b/libc/src/unix/bsd/netbsdlike/netbsd/mod.rs
index 9c8173f..760582c 100644
--- a/libc/src/unix/bsd/netbsdlike/netbsd/mod.rs
+++ b/libc/src/unix/bsd/netbsdlike/netbsd/mod.rs
@@ -987,6 +987,20 @@ pub const CHWFLOW: ::tcflag_t = ::MDMBUF | ::CRTSCTS | ::CDTRCTS;
pub const SOCK_CLOEXEC: ::c_int = 0x10000000;
pub const SOCK_NONBLOCK: ::c_int = 0x20000000;
+pub const FIONCLEX: ::c_ulong = 0x20006602;
+// Uncomment on next NetBSD release
+// pub const FIOSEEKDATA: ::c_ulong = 0xc0086661;
+// pub const FIOSEEKHOLE: ::c_ulong = 0xc0086662;
+pub const FIONREAD: ::c_ulong = 0x4004667f;
+pub const FIOASYNC: ::c_ulong = 0x8004667d;
+pub const FIOSETOWN: ::c_ulong = 0x8004667c;
+pub const FIOGETOWN: ::c_ulong = 0x4004667b;
+pub const OFIOGETBMAP: ::c_ulong = 0xc004667a;
+pub const FIOGETBMAP: ::c_ulong = 0xc008667a;
+pub const FIONWRITE: ::c_ulong = 0x40046679;
+pub const FIONSPACE: ::c_ulong = 0x40046678;
+pub const FIBMAP: ::c_ulong = 0xc008667a;
+
pub const SIGSTKSZ : ::size_t = 40960;
pub const PT_DUMPCORE: ::c_int = 12;