aboutsummaryrefslogtreecommitdiff
path: root/libc/src/unix/bsd/freebsdlike/dragonfly/errno.rs
diff options
context:
space:
mode:
authorDaniel Mueller <deso@posteo.net>2019-08-15 08:11:13 -0700
committerDaniel Mueller <deso@posteo.net>2019-08-15 08:11:13 -0700
commit155f9b7e7f36975240ef93f3daf983b228592a11 (patch)
treeb407ef697d1241cdbc46bc0b5a8545c63a7bafad /libc/src/unix/bsd/freebsdlike/dragonfly/errno.rs
parent49f5194e16db47b6de9847b79840c6fe35e0df8c (diff)
downloadnitrocli-155f9b7e7f36975240ef93f3daf983b228592a11.tar.gz
nitrocli-155f9b7e7f36975240ef93f3daf983b228592a11.tar.bz2
Update libc crate to 0.2.62
This change updates the libc crate to version 0.2.62. Import subrepo libc/:libc at 37f8f8dc233a79ea9cc89b102aa30ff6e402fe94
Diffstat (limited to 'libc/src/unix/bsd/freebsdlike/dragonfly/errno.rs')
-rw-r--r--libc/src/unix/bsd/freebsdlike/dragonfly/errno.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/libc/src/unix/bsd/freebsdlike/dragonfly/errno.rs b/libc/src/unix/bsd/freebsdlike/dragonfly/errno.rs
new file mode 100644
index 0000000..e18036a
--- /dev/null
+++ b/libc/src/unix/bsd/freebsdlike/dragonfly/errno.rs
@@ -0,0 +1,12 @@
+// DragonFlyBSD's __error function is declared with "static inline", so it must
+// be implemented in the libc crate, as a pointer to a static thread_local.
+f! {
+ pub fn __error() -> *mut ::c_int {
+ &mut errno
+ }
+}
+
+extern {
+ #[thread_local]
+ pub static mut errno: ::c_int;
+}