@@ -683,6 +683,16 @@ impl std::fmt::Debug for dirent {
683683 . finish ( )
684684 }
685685}
686+ #[ cfg( feature = "extra_traits" ) ]
687+ impl std:: hash:: Hash for dirent {
688+ fn hash < H : std:: hash:: Hasher > ( & self , state : & mut H ) {
689+ self . d_ino . hash ( state) ;
690+ self . d_off . hash ( state) ;
691+ self . d_reclen . hash ( state) ;
692+ self . d_type . hash ( state) ;
693+ self . d_name . hash ( state) ;
694+ }
695+ }
686696
687697#[ cfg( feature = "extra_traits" ) ]
688698impl PartialEq for dirent64 {
@@ -708,6 +718,16 @@ impl std::fmt::Debug for dirent64 {
708718 . finish ( )
709719 }
710720}
721+ #[ cfg( feature = "extra_traits" ) ]
722+ impl std:: hash:: Hash for dirent64 {
723+ fn hash < H : std:: hash:: Hasher > ( & self , state : & mut H ) {
724+ self . d_ino . hash ( state) ;
725+ self . d_off . hash ( state) ;
726+ self . d_reclen . hash ( state) ;
727+ self . d_type . hash ( state) ;
728+ self . d_name . hash ( state) ;
729+ }
730+ }
711731
712732#[ cfg( feature = "extra_traits" ) ]
713733impl PartialEq for pthread_cond_t {
@@ -725,6 +745,12 @@ impl std::fmt::Debug for pthread_cond_t {
725745 . finish ( )
726746 }
727747}
748+ #[ cfg( feature = "extra_traits" ) ]
749+ impl std:: hash:: Hash for pthread_cond_t {
750+ fn hash < H : std:: hash:: Hasher > ( & self , state : & mut H ) {
751+ self . size . hash ( state) ;
752+ }
753+ }
728754
729755#[ cfg( feature = "extra_traits" ) ]
730756impl PartialEq for pthread_mutex_t {
@@ -742,6 +768,12 @@ impl std::fmt::Debug for pthread_mutex_t {
742768 . finish ( )
743769 }
744770}
771+ #[ cfg( feature = "extra_traits" ) ]
772+ impl std:: hash:: Hash for pthread_mutex_t {
773+ fn hash < H : std:: hash:: Hasher > ( & self , state : & mut H ) {
774+ self . size . hash ( state) ;
775+ }
776+ }
745777
746778#[ cfg( feature = "extra_traits" ) ]
747779impl PartialEq for pthread_rwlock_t {
@@ -759,6 +791,12 @@ impl std::fmt::Debug for pthread_rwlock_t {
759791 . finish ( )
760792 }
761793}
794+ #[ cfg( feature = "extra_traits" ) ]
795+ impl std:: hash:: Hash for pthread_rwlock_t {
796+ fn hash < H : std:: hash:: Hasher > ( & self , state : & mut H ) {
797+ self . size . hash ( state) ;
798+ }
799+ }
762800
763801pub const ABDAY_1 : :: nl_item = 0x20000 ;
764802pub const ABDAY_2 : :: nl_item = 0x20001 ;
0 commit comments