diff --git a/Data/UnixTime/Sys.hsc b/Data/UnixTime/Sys.hsc
--- a/Data/UnixTime/Sys.hsc
+++ b/Data/UnixTime/Sys.hsc
@@ -18,15 +18,14 @@
 type CTimeZone = ()
 
 foreign import ccall unsafe "gettimeofday"
-    gettimeofday :: Ptr CTimeVal -> Ptr CTimeZone -> IO CInt
+    c_gettimeofday :: Ptr CTimeVal -> Ptr CTimeZone -> IO CInt
 
 -- |
 -- Getting 'UnixTime' from OS.
 
 getUnixTime :: IO UnixTime
-getUnixTime =
-  allocaBytes (#const sizeof(struct timeval)) $ \ p_timeval -> do
-    throwErrnoIfMinus1_ "getClockTime" $ gettimeofday p_timeval nullPtr
-    sec <- (#peek struct timeval,tv_sec) p_timeval
+getUnixTime = allocaBytes (#const sizeof(struct timeval)) $ \ p_timeval -> do
+    throwErrnoIfMinus1_ "getClockTime" $ c_gettimeofday p_timeval nullPtr
+    sec  <- (#peek struct timeval,tv_sec)  p_timeval
     usec <- (#peek struct timeval,tv_usec) p_timeval
     return $ UnixTime sec usec
diff --git a/cbits/conv.c b/cbits/conv.c
--- a/cbits/conv.c
+++ b/cbits/conv.c
@@ -7,6 +7,7 @@
 #define _BSD_SOURCE
 #elif HAVE_STRPTIME_L
 #define THREAD_SAFE 1
+#define _GNU_SOURCE
 #else
 #define THREAD_SAFE 0
 #endif
@@ -21,7 +22,7 @@
 locale_t c_locale = NULL;
 
 void init_locale() {
-    if (c_locale == NULL) c_locale = newlocale(LC_TIME_MASK, NULL, NULL);
+    if (c_locale == NULL) c_locale = newlocale(LC_TIME_MASK, "C", NULL);
 }
 #else
 void init_locale() {
diff --git a/unix-time.cabal b/unix-time.cabal
--- a/unix-time.cabal
+++ b/unix-time.cabal
@@ -1,5 +1,5 @@
 Name:                   unix-time
-Version:                0.1.8
+Version:                0.1.9
 Author:                 Kazu Yamamoto <kazu@iij.ad.jp>
 Maintainer:             Kazu Yamamoto <kazu@iij.ad.jp>
 License:                BSD3
