diff options
author | Karel Gardas <karel.gardas@centrum.cz> | 2014-07-25 23:42:00 +0200 |
---|---|---|
committer | Herbert Valerio Riedel <hvr@gnu.org> | 2014-10-18 16:54:28 +0200 |
commit | 1b53296fba0d36f6144c7797e96bf95b33a4cd7e (patch) | |
tree | e3042b3ae1b3ab7b1bd95f9925ace150f9a9ebcd /System | |
parent | bc4bd179bda49b615a1c40df7402ddf80bf775b2 (diff) |
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.
Diffstat (limited to 'System')
-rw-r--r-- | System/Posix/SharedMem.hsc | 4 |
1 files changed, 2 insertions, 2 deletions
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 <sys/types.h> #include <sys/mman.h> #include <fcntl.h> -#include "HsUnix.h" - import System.Posix.Types #if defined(HAVE_SHM_OPEN) || defined(HAVE_SHM_UNLINK) import Foreign.C |