Skip to content

Commit

Permalink
Avoid warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-rouse committed Mar 20, 2018
1 parent 54b93fb commit 9376bb6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions Database/MySQL/Base/Types.hsc
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ instance Storable Field where
sizeOf _ = #{size MYSQL_FIELD}
alignment _ = alignment (undefined :: Ptr CChar)
peek = peekField
poke _ _ = return () -- Unused, but define it to avoid a warning

type Seconds = Word

Expand Down
5 changes: 5 additions & 0 deletions Setup.hs
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,13 @@ mysqlConfigProgram = (simpleProgram "mysql_config") {

mysqlBuildInfo :: LocalBuildInfo -> IO BuildInfo
mysqlBuildInfo lbi = do
#if MIN_VERSION_Cabal(2,0,0)
let mysqlConfig = fmap words . getDbProgramOutput normal
mysqlConfigProgram (withPrograms lbi)
#else
let mysqlConfig = fmap words . rawSystemProgramStdoutConf normal
mysqlConfigProgram (withPrograms lbi)
#endif

include <- mysqlConfig ["--include"]
libs <- mysqlConfig ["--libs"]
Expand Down

0 comments on commit 9376bb6

Please sign in to comment.