summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgnzlbg <gonzalobg88@gmail.com>2019-03-03 16:18:43 +0100
committergnzlbg <gonzalobg88@gmail.com>2019-03-03 18:44:21 +0100
commit51794419a5c4a179d8c5d6a9d55d64b3666c0207 (patch)
tree5bf23a6ed253a9a35aa55b64fc84e9641fc8bf4c
parent278c56553edd991e289675167b4d9e7b41b87f48 (diff)
downloadrust-libc-51794419a5c4a179d8c5d6a9d55d64b3666c0207.tar.gz
Fix uclibc build errors
-rw-r--r--src/unix/uclibc/align.rs13
-rw-r--r--src/unix/uclibc/mod.rs84
2 files changed, 53 insertions, 44 deletions
diff --git a/src/unix/uclibc/align.rs b/src/unix/uclibc/align.rs
index bcae2e6b0b..1e53ff4bc9 100644
--- a/src/unix/uclibc/align.rs
+++ b/src/unix/uclibc/align.rs
@@ -47,15 +47,18 @@ macro_rules! expand_align {
size: [u8; ::__SIZEOF_PTHREAD_MUTEXATTR_T],
}
- #[repr(align(8))]
- pub struct pthread_cond_t {
- size: [u8; ::__SIZEOF_PTHREAD_COND_T],
- }
-
#[repr(align(4))]
pub struct pthread_condattr_t {
size: [u8; ::__SIZEOF_PTHREAD_CONDATTR_T],
}
}
+
+ s_no_extra_traits! {
+ #[repr(align(8))]
+ #[allow(missing_debug_implementations)]
+ pub struct pthread_cond_t {
+ size: [u8; ::__SIZEOF_PTHREAD_COND_T],
+ }
+ }
}
}
diff --git a/src/unix/uclibc/mod.rs b/src/unix/uclibc/mod.rs
index d2735dba8d..eec3fe01ca 100644
--- a/src/unix/uclibc/mod.rs
+++ b/src/unix/uclibc/mod.rs
@@ -66,20 +66,6 @@ s! {
pub sin6_scope_id: u32,
}
- pub struct sockaddr_un {
- pub sun_family: sa_family_t,
- pub sun_path: [::c_char; 108]
- }
-
- pub struct sockaddr_storage {
- pub ss_family: sa_family_t,
- __ss_align: ::size_t,
- #[cfg(target_pointer_width = "32")]
- __ss_pad2: [u8; 128 - 2 * 4],
- #[cfg(target_pointer_width = "64")]
- __ss_pad2: [u8; 128 - 2 * 8],
- }
-
pub struct addrinfo {
pub ai_flags: ::c_int,
pub ai_family: ::c_int,
@@ -140,15 +126,6 @@ s! {
pub dli_saddr: *mut ::c_void,
}
- pub struct utsname {
- pub sysname: [::c_char; 65],
- pub nodename: [::c_char; 65],
- pub release: [::c_char; 65],
- pub version: [::c_char; 65],
- pub machine: [::c_char; 65],
- pub domainname: [::c_char; 65]
- }
-
pub struct lconv {
pub decimal_point: *mut ::c_char,
pub thousands_sep: *mut ::c_char,
@@ -189,22 +166,6 @@ s! {
__unused1: [::c_int; 12]
}
- pub struct dirent {
- pub d_ino: ::ino_t,
- pub d_off: ::off_t,
- pub d_reclen: ::c_ushort,
- pub d_type: ::c_uchar,
- pub d_name: [::c_char; 256],
- }
-
- pub struct dirent64 {
- pub d_ino: ::ino64_t,
- pub d_off: ::off64_t,
- pub d_reclen: ::c_ushort,
- pub d_type: ::c_uchar,
- pub d_name: [::c_char; 256],
- }
-
pub struct rlimit64 {
pub rlim_cur: rlim64_t,
pub rlim_max: rlim64_t,
@@ -358,10 +319,55 @@ s_no_extra_traits! {
any(target_arch = "x86", target_arch = "x86_64"),
repr(packed)
)]
+ #[allow(missing_debug_implementations)]
pub struct epoll_event {
pub events: ::uint32_t,
pub u64: ::uint64_t,
}
+
+ #[allow(missing_debug_implementations)]
+ pub struct sockaddr_un {
+ pub sun_family: sa_family_t,
+ pub sun_path: [::c_char; 108]
+ }
+
+ #[allow(missing_debug_implementations)]
+ pub struct sockaddr_storage {
+ pub ss_family: sa_family_t,
+ __ss_align: ::size_t,
+ #[cfg(target_pointer_width = "32")]
+ __ss_pad2: [u8; 128 - 2 * 4],
+ #[cfg(target_pointer_width = "64")]
+ __ss_pad2: [u8; 128 - 2 * 8],
+ }
+
+ #[allow(missing_debug_implementations)]
+ pub struct utsname {
+ pub sysname: [::c_char; 65],
+ pub nodename: [::c_char; 65],
+ pub release: [::c_char; 65],
+ pub version: [::c_char; 65],
+ pub machine: [::c_char; 65],
+ pub domainname: [::c_char; 65]
+ }
+
+ #[allow(missing_debug_implementations)]
+ pub struct dirent {
+ pub d_ino: ::ino_t,
+ pub d_off: ::off_t,
+ pub d_reclen: ::c_ushort,
+ pub d_type: ::c_uchar,
+ pub d_name: [::c_char; 256],
+ }
+
+ #[allow(missing_debug_implementations)]
+ pub struct dirent64 {
+ pub d_ino: ::ino64_t,
+ pub d_off: ::off64_t,
+ pub d_reclen: ::c_ushort,
+ pub d_type: ::c_uchar,
+ pub d_name: [::c_char; 256],
+ }
}
// intentionally not public, only used for fd_set