id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	os	architecture	failure	difficulty	testcase	blockedby	blocking	related
5172	unix-compat does not build because of strangeness in GHC's header files.	rtvd		"I have build 7.0.3 from source and then tried building unix-compat library.
The library failed to build because it could not find libutil.h.

Digging a bit deeper I found the following:

unix-compat includes among other things header files from GHC.

./libraries/unix/include/HsUnixConfig.h has this in it:
{{{
  /* Define to 1 if you have the <libutil.h> header file. */
  #define HAVE_LIBUTIL_H 0
}}}
However, ./libraries/unix/include/HsUnix.h has this:
{{{
  #ifdef HAVE_LIBUTIL_H
  #include <libutil.h>
  #endif
}}}
Naturally, it has tried to include the non-existing libutil.h. Even though HAVE_LIBUTIL_H is zero, it is still considered to be defined.

After removing this line:
{{{
  #define HAVE_LIBUTIL_H 0
}}}
unix-compat has been successfully built."	bug	closed	normal		Runtime System	7.0.3	worksforme	unix-compat	byorgey@… jystic@…	Unknown/Multiple	Unknown/Multiple	Other					
