From 1b53296fba0d36f6144c7797e96bf95b33a4cd7e Mon Sep 17 00:00:00 2001 From: Karel Gardas Date: Fri, 25 Jul 2014 23:42:00 +0200 Subject: fix _FILE_OFFSET_BITS redefined warning on Solaris/x86 The issue is that sys/types.h header on Solaris includes somehow /usr/include/sys/feature_tests.h which tests if _FILE_OFFSET_BITS is defined and if not, then it defines it to 32 if we're compiling 32 bit code (x86). This is simply wrong since we'd like to have it defined to 64. The issue is solved by including HsUnixConfig.h first which defines _FILE_OFFSET_BITS to 64 and feature_tests.h is later OK with that. --- System/Posix/SharedMem.hsc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'System') diff --git a/System/Posix/SharedMem.hsc b/System/Posix/SharedMem.hsc index 1d7a80a..c85e4b7 100644 --- a/System/Posix/SharedMem.hsc +++ b/System/Posix/SharedMem.hsc @@ -19,12 +19,12 @@ module System.Posix.SharedMem (ShmOpenFlags(..), shmOpen, shmUnlink) where +#include "HsUnix.h" + #include #include #include -#include "HsUnix.h" - import System.Posix.Types #if defined(HAVE_SHM_OPEN) || defined(HAVE_SHM_UNLINK) import Foreign.C -- cgit v1.2.3