diff --git a/System/Lock/FLock.hsc b/System/Lock/FLock.hsc
--- a/System/Lock/FLock.hsc
+++ b/System/Lock/FLock.hsc
@@ -19,7 +19,7 @@
 c_LOCK_UN = #const LOCK_UN
 c_LOCK_NB = #const LOCK_NB
 
-foreign import ccall unsafe "sys/file.h flock" flock :: CInt -> CInt -> IO CInt
+foreign import ccall safe "sys/file.h flock" flock :: CInt -> CInt -> IO CInt
 
 data SharedExclusive = Shared | Exclusive
 
diff --git a/flock.cabal b/flock.cabal
--- a/flock.cabal
+++ b/flock.cabal
@@ -1,5 +1,5 @@
 Name:               flock
-Version:            0.2
+Version:            0.2.1
 License:            OtherLicense
 License-File:       COPYING
 Copyright:          Ian Lynagh, 2007
@@ -13,10 +13,10 @@
 Build-Type:         Simple
 Tested-With:        GHC==6.10.3, GHC==6.12.3
 Cabal-Version:      >= 1.6
-Build-Depends:      base > 3 && < 5, unix >= 2.3 && < 2.5, mtl == 1.1.*
-Extensions:         ForeignFunctionInterface
 Extra-source-files: "BSD3", "GPL-2"
-Exposed-modules:
-    System.Lock.FLock
-GHC-Options: -Wall
 
+Library
+  Build-Depends:      base > 3 && < 5, unix >= 2.3 && < 2.5, mtl == 1.1.*
+  Extensions:         ForeignFunctionInterface
+  Exposed-modules:    System.Lock.FLock
+  GHC-Options:        -Wall
