Fix compilation of `test-round.c' on BSD.
authorLudovic Courtès <ludo@gnu.org>
Mon, 11 May 2009 20:13:29 +0000 (22:13 +0200)
committerLudovic Courtès <ludo@gnu.org>
Wed, 20 May 2009 22:12:43 +0000 (00:12 +0200)
* test-suite/standalone/test-round.c (HAVE_MACHINE_FPU_H): Include
  <sys/types.h> when available.  This fixes compilation on NetBSD.
  Reported by Greg Toxel.

test-suite/standalone/test-round.c

index f9b4077..1340fff 100644 (file)
 #if HAVE_FENV_H
 #include <fenv.h>
 #elif defined HAVE_MACHINE_FPU_H
-/* On Tru64 5.1b, the declaration of fesetround(3) is here.  */
+/* On Tru64 5.1b, the declaration of fesetround(3) is in <machine/fpu.h>.
+   On NetBSD, this header has to be included along with <sys/types.h>.  */
+# ifdef HAVE_SYS_TYPES_H
+#  include <sys/types.h>
+# endif
 # include <machine/fpu.h>
 #endif