summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorHerbert Valerio Riedel <hvr@gnu.org>2015-12-04 10:40:42 +0100
committerHerbert Valerio Riedel <hvr@gnu.org>2015-12-04 10:43:56 +0100
commit6ef351df6172f0795e77323fa2ca45b3ae670502 (patch)
tree90425caa01d2162263b98b567b45eec529f0c106 /includes
parentcd9f3bf9b8068fc52bb61bc3badcc1c753fbd14b (diff)
downloadhaskell-6ef351df6172f0795e77323fa2ca45b3ae670502.tar.gz
On AIX we need -D_BSD defined in <Stg.h>
As otherwise <math.h> includes <stdlib.h> which breaks compilation of .hc files
Diffstat (limited to 'includes')
-rw-r--r--includes/Stg.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/includes/Stg.h b/includes/Stg.h
index f09fc00966..899e685635 100644
--- a/includes/Stg.h
+++ b/includes/Stg.h
@@ -48,6 +48,11 @@
// on Linux
# define _BSD_SOURCE
+// On AIX we need _BSD defined, otherwise <math.h> includes <stdlib.h>
+# if defined(_AIX)
+# define _BSD 1
+# endif
+
// '_BSD_SOURCE' is deprecated since glibc-2.20
// in favour of '_DEFAULT_SOURCE'
# define _DEFAULT_SOURCE