We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c354c21 commit 2e3748aCopy full SHA for 2e3748a
src/unix/bsd/freebsdlike/dragonfly/errno.rs
@@ -0,0 +1,13 @@
1
+// DragonFlyBSD's __error function is declared with "static inline", so it must
2
+// be implemented in the libc crate, as a pointer to a static thread_local.
3
+f! {
4
+ #[deprecated(since = "0.2.77", "Use `__errno_location()` instead")]
5
+ pub fn __error() -> *mut ::c_int {
6
+ &mut errno
7
+ }
8
+}
9
+
10
+extern "C" {
11
+ #[thread_local]
12
+ pub static mut errno: ::c_int;
13
src/unix/bsd/freebsdlike/dragonfly/mod.rs
@@ -1078,3 +1078,10 @@ extern "C" {
1078
needlelen: ::size_t,
1079
) -> *mut ::c_void;
1080
}
1081
1082
+cfg_if! {
1083
+ if #[cfg(libc_thread_local)] {
1084
+ mod errno;
1085
+ pub use self::errno::*;
1086
1087
0 commit comments