summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorViktor Dukhovni <ietf-dane@dukhovni.org>2019-11-10 13:11:19 -0500
committerViktor Dukhovni <ietf-dane@dukhovni.org>2019-11-23 01:50:17 -0500
commit273d802b4529f33e40bd5efc51501fc4c9003db4 (patch)
treeedd521cb6a6659d54c75fd0c2e3225f18b43869b
parentd092d8598694c23bc07cdcc504dff52fa5f33be1 (diff)
downloadhaskell-273d802b4529f33e40bd5efc51501fc4c9003db4.tar.gz
On FreeBSD 12 sys/sysctl.h requires sys/types.h
Else build fails with: In file included from ExecutablePath.hsc:42: /usr/include/sys/sysctl.h:1062:25: error: unknown type name 'u_int'; did you mean 'int'? int sysctl(const int *, u_int, void *, size_t *, const void *, size_t); ^~~~~ int compiling libraries/base/dist-install/build/System/Environment/ExecutablePath_hsc_make.c failed (exit code 1) Perhaps also also other FreeBSD releases, but additional include will no harm even if not needed.
-rw-r--r--libraries/base/System/Environment/ExecutablePath.hsc1
1 files changed, 1 insertions, 0 deletions
diff --git a/libraries/base/System/Environment/ExecutablePath.hsc b/libraries/base/System/Environment/ExecutablePath.hsc
index 3c9d36cb88..cdf39ea041 100644
--- a/libraries/base/System/Environment/ExecutablePath.hsc
+++ b/libraries/base/System/Environment/ExecutablePath.hsc
@@ -39,6 +39,7 @@ import Foreign.Marshal.Array
import Foreign.Ptr
import Foreign.Storable
import System.Posix.Internals
+#include <sys/types.h>
#include <sys/sysctl.h>
#elif defined(mingw32_HOST_OS)
import Control.Exception