From 5e2b0d88d43b15014f4b91fc2589b454e82bc6b1 Mon Sep 17 00:00:00 2001
From: gnzlbg <gonzalobg88@gmail.com>
Date: Fri, 24 May 2019 13:49:11 +0200
Subject: [PATCH] Fix locale_t in unix and fuchsia.

Closes #1055.
---
 src/fuchsia/mod.rs | 9 +++------
 src/unix/mod.rs    | 7 +------
 2 files changed, 4 insertions(+), 12 deletions(-)

diff --git a/src/fuchsia/mod.rs b/src/fuchsia/mod.rs
index cef48e52..b8388b6e 100644
--- a/src/fuchsia/mod.rs
+++ b/src/fuchsia/mod.rs
@@ -27,6 +27,8 @@ pub type c_ulonglong = u64;
 pub type intmax_t = i64;
 pub type uintmax_t = u64;
 
+pub type locale_t = *mut ::c_void;
+
 pub type size_t = usize;
 pub type ptrdiff_t = isize;
 pub type intptr_t = isize;
@@ -110,12 +112,7 @@ impl ::Copy for DIR {}
 impl ::Clone for DIR {
     fn clone(&self) -> DIR { *self }
 }
-#[cfg_attr(feature = "extra_traits", derive(Debug))]
-pub enum locale_t {}
-impl ::Copy for locale_t {}
-impl ::Clone for locale_t {
-    fn clone(&self) -> locale_t { *self }
-}
+
 #[cfg_attr(feature = "extra_traits", derive(Debug))]
 pub enum fpos64_t {} // TODO: fill this out with a struct
 impl ::Copy for fpos64_t {}
diff --git a/src/unix/mod.rs b/src/unix/mod.rs
index 6240964d..5ae272f6 100644
--- a/src/unix/mod.rs
+++ b/src/unix/mod.rs
@@ -45,12 +45,7 @@ impl ::Copy for DIR {}
 impl ::Clone for DIR {
     fn clone(&self) -> DIR { *self }
 }
-#[cfg_attr(feature = "extra_traits", derive(Debug))]
-pub enum locale_t {}
-impl ::Copy for locale_t {}
-impl ::Clone for locale_t {
-    fn clone(&self) -> locale_t { *self }
-}
+pub type locale_t = *mut :: c_void;
 
 s! {
     pub struct group {
-- 
GitLab