This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[libiberty] Fix testsuite/test-demangle.c


This is similar to my fix for testsuite/test-expandargv.c last week.

I'm still not sure why this does not trigger on GNU/Linux distributions,
or earlier version of FreeBSD.  On FreeBSD 10 one does need to #include 
<unistd.h> to get getpagesize which is used by the test.

With this, the test now compiles on my i386-unknown-freebsd10.0 tester;
without it, it doesn't.

Okay?

Gerald

2013-10-26  Gerald Pfeifer  <gerald@pfeifer.com>

        * testsuite/test-demangle.c: Include unistd.h.

Index: libiberty/testsuite/test-demangle.c
===================================================================
--- libiberty/testsuite/test-demangle.c	(revision 204095)
+++ libiberty/testsuite/test-demangle.c	(working copy)
@@ -32,6 +32,9 @@
 #if HAVE_STDLIB_H
 # include <stdlib.h>
 #endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
 
 struct line
 {


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]