Skip to content

Commit 602f039

Browse files
committed
Small syncs from main to libc-0.2
1 parent b190462 commit 602f039

File tree

13 files changed

+28
-27
lines changed

13 files changed

+28
-27
lines changed

src/fuchsia/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ s! {
382382
}
383383

384384
pub struct fd_set {
385-
fds_bits: [::c_ulong; FD_SETSIZE / ULONG_SIZE],
385+
fds_bits: [::c_ulong; FD_SETSIZE as usize / ULONG_SIZE],
386386
}
387387

388388
pub struct tm {

src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ cfg_if! {
4646
#[allow(unused_imports)]
4747
use core::clone::Clone;
4848
#[allow(unused_imports)]
49+
use core::ffi;
50+
#[allow(unused_imports)]
4951
use core::fmt;
5052
#[allow(unused_imports)]
5153
use core::hash;

src/macros.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ macro_rules! s_paren {
9898
($(
9999
$(#[$attr:meta])*
100100
pub struct $i:ident ( $($field:tt)* );
101-
)* ) => ($(
101+
)*) => ($(
102102
__item! {
103103
#[cfg_attr(feature = "extra_traits", derive(Debug, Eq, Hash, PartialEq))]
104104
#[derive(Copy, Clone)]

src/unix/aix/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ cfg_if! {
573573
}
574574
impl Eq for __sigaction_sa_union {}
575575
impl ::fmt::Debug for __sigaction_sa_union {
576-
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {
576+
fn fmt(&self, f: &mut ::fmt::Formatter<'_>) -> ::fmt::Result {
577577
f.debug_struct("__sigaction_sa_union")
578578
.field("__su_handler", unsafe { &self.__su_handler })
579579
.field("__su_sigaction", unsafe { &self.__su_sigaction })
@@ -598,7 +598,7 @@ cfg_if! {
598598
}
599599
impl Eq for sigaction {}
600600
impl ::fmt::Debug for sigaction {
601-
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {
601+
fn fmt(&self, f: &mut ::fmt::Formatter<'_>) -> ::fmt::Result {
602602
f.debug_struct("sigaction")
603603
.field("sa_union", &self.sa_union)
604604
.field("sa_mask", &self.sa_mask)
@@ -625,7 +625,7 @@ cfg_if! {
625625
}
626626
impl Eq for __poll_ctl_ext_u {}
627627
impl ::fmt::Debug for __poll_ctl_ext_u {
628-
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {
628+
fn fmt(&self, f: &mut ::fmt::Formatter<'_>) -> ::fmt::Result {
629629
f.debug_struct("__poll_ctl_ext_u")
630630
.field("addr", unsafe { &self.addr })
631631
.field("data32", unsafe { &self.data32 })
@@ -655,7 +655,7 @@ cfg_if! {
655655
}
656656
impl Eq for poll_ctl_ext {}
657657
impl ::fmt::Debug for poll_ctl_ext {
658-
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {
658+
fn fmt(&self, f: &mut ::fmt::Formatter<'_>) -> ::fmt::Result {
659659
f.debug_struct("poll_ctl_ext")
660660
.field("version", &self.version)
661661
.field("command", &self.command)

src/unix/aix/powerpc64.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ cfg_if! {
307307
}
308308
impl Eq for siginfo_t {}
309309
impl ::fmt::Debug for siginfo_t {
310-
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {
310+
fn fmt(&self, f: &mut ::fmt::Formatter<'_>) -> ::fmt::Result {
311311
f.debug_struct("siginfo_t")
312312
.field("si_signo", &self.si_signo)
313313
.field("si_errno", &self.si_errno)
@@ -347,7 +347,7 @@ cfg_if! {
347347
}
348348
impl Eq for _kernel_simple_lock {}
349349
impl ::fmt::Debug for _kernel_simple_lock {
350-
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {
350+
fn fmt(&self, f: &mut ::fmt::Formatter<'_>) -> ::fmt::Result {
351351
f.debug_struct("_kernel_simple_lock")
352352
.field("_slock", unsafe { &self._slock })
353353
.field("_slockp", unsafe { &self._slockp })
@@ -410,12 +410,12 @@ cfg_if! {
410410
&& self.f_fnamep == other.f_fnamep
411411
&& self.f_fdata == other.f_fdata
412412
&& self.f_lock == other.f_lock
413-
&& self.f_offset_lock == other.f_offset_lock;
413+
&& self.f_offset_lock == other.f_offset_lock
414414
}
415415
}
416416
impl Eq for file {}
417417
impl ::fmt::Debug for file {
418-
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {
418+
fn fmt(&self, f: &mut ::fmt::Formatter<'_>) -> ::fmt::Result {
419419
f.debug_struct("file")
420420
.field("f_flag", &self.f_flag)
421421
.field("f_count", &self.f_count)
@@ -466,7 +466,7 @@ cfg_if! {
466466
}
467467
impl Eq for __ld_info_file {}
468468
impl ::fmt::Debug for __ld_info_file {
469-
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {
469+
fn fmt(&self, f: &mut ::fmt::Formatter<'_>) -> ::fmt::Result {
470470
f.debug_struct("__ld_info_file")
471471
.field("_ldinfo_fd", unsafe { &self._ldinfo_fd })
472472
.field("_ldinfo_fp", unsafe { &self._ldinfo_fp })
@@ -498,7 +498,7 @@ cfg_if! {
498498
}
499499
impl Eq for ld_info {}
500500
impl ::fmt::Debug for ld_info {
501-
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {
501+
fn fmt(&self, f: &mut ::fmt::Formatter<'_>) -> ::fmt::Result {
502502
f.debug_struct("ld_info")
503503
.field("ldinfo_next", &self.ldinfo_next)
504504
.field("ldinfo_flags", &self.ldinfo_flags)
@@ -535,7 +535,7 @@ cfg_if! {
535535
}
536536
impl Eq for __pollfd_ext_u {}
537537
impl ::fmt::Debug for __pollfd_ext_u {
538-
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {
538+
fn fmt(&self, f: &mut ::fmt::Formatter<'_>) -> ::fmt::Result {
539539
f.debug_struct("__pollfd_ext_u")
540540
.field("addr", unsafe { &self.addr })
541541
.field("data32", unsafe { &self.data32 })
@@ -563,7 +563,7 @@ cfg_if! {
563563
}
564564
impl Eq for pollfd_ext {}
565565
impl ::fmt::Debug for pollfd_ext {
566-
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {
566+
fn fmt(&self, f: &mut ::fmt::Formatter<'_>) -> ::fmt::Result {
567567
f.debug_struct("pollfd_ext")
568568
.field("fd", &self.fd)
569569
.field("events", &self.events)

src/unix/bsd/apple/mod.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1595,7 +1595,7 @@ s_no_extra_traits! {
15951595
_os_unfair_lock_opaque: u32,
15961596
}
15971597

1598-
#[repr(packed(1))]
1598+
#[repr(packed(1))]
15991599
pub struct sockaddr_vm {
16001600
pub svm_len: ::c_uchar,
16011601
pub svm_family: ::sa_family_t,
@@ -1722,8 +1722,7 @@ cfg_if! {
17221722
}
17231723
impl Eq for semun {}
17241724
impl ::fmt::Debug for semun {
1725-
fn fmt(&self, f: &mut ::fmt::Formatter)
1726-
-> ::fmt::Result {
1725+
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {
17271726
f.debug_struct("semun")
17281727
.field("val", unsafe { &self.val })
17291728
.finish()
@@ -1775,7 +1774,6 @@ cfg_if! {
17751774
&& self.udata == other.udata
17761775
}
17771776
}
1778-
17791777
impl Eq for kevent {}
17801778
impl ::fmt::Debug for kevent {
17811779
fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result {

src/unix/bsd/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ s! {
6060
pub struct fd_set {
6161
#[cfg(all(target_pointer_width = "64",
6262
any(target_os = "freebsd", target_os = "dragonfly")))]
63-
fds_bits: [i64; FD_SETSIZE / 64],
63+
fds_bits: [i64; FD_SETSIZE as usize / 64],
6464
#[cfg(not(all(target_pointer_width = "64",
6565
any(target_os = "freebsd", target_os = "dragonfly"))))]
66-
fds_bits: [i32; FD_SETSIZE / 32],
66+
fds_bits: [i32; FD_SETSIZE as usize / 32],
6767
}
6868

6969
pub struct tm {
@@ -129,7 +129,7 @@ s_no_extra_traits! {
129129
pub struct sockaddr_un {
130130
pub sun_len: u8,
131131
pub sun_family: sa_family_t,
132-
pub sun_path: [c_char; 104]
132+
pub sun_path: [::c_char; 104]
133133
}
134134

135135
pub struct utsname {

src/unix/bsd/netbsdlike/netbsd/aarch64.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ cfg_if! {
8181
}
8282

8383
pub(crate) const _ALIGNBYTES: usize = ::mem::size_of::<::c_int>() - 1;
84+
8485
pub const PT_GETREGS: ::c_int = PT_FIRSTMACH + 0;
8586
pub const PT_SETREGS: ::c_int = PT_FIRSTMACH + 1;
8687
pub const PT_GETFPREGS: ::c_int = PT_FIRSTMACH + 2;

src/unix/linux_like/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ s! {
8585
}
8686

8787
pub struct fd_set {
88-
fds_bits: [::c_ulong; FD_SETSIZE / ULONG_SIZE],
88+
fds_bits: [::c_ulong; FD_SETSIZE as usize / ULONG_SIZE],
8989
}
9090

9191
pub struct tm {

src/unix/newlib/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ s! {
183183
}
184184

185185
pub struct fd_set { // Unverified
186-
fds_bits: [::c_ulong; FD_SETSIZE / ULONG_SIZE],
186+
fds_bits: [::c_ulong; FD_SETSIZE as usize / ULONG_SIZE],
187187
}
188188

189189
pub struct passwd { // Unverified

0 commit comments

Comments
 (0)